/* Generated by Cython 0.29.36 */

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

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_36"
#define CYTHON_HEX_VERSION 0x001D24F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS ((PY_VERSION_HEX >= 0x030600B1) && (PY_VERSION_HEX < 0x030C00A5))
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

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

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

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__apache_beam__coders__coder_impl
#define __PYX_HAVE_API__apache_beam__coders__coder_impl
/* Early includes */
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "math.h"
#include "pythread.h"
#include "pystate.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

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


static const char *__pyx_f[] = {
  "apache_beam/coders/coder_impl.py",
  "stringsource",
  "apache_beam/coders/coder_impl.pxd",
  "type.pxd",
  "apache_beam/coders/stream.pxd",
  "apache_beam/utils/windowed_value.pxd",
};
/* MemviewSliceStruct.proto */
struct __pyx_memoryview_obj;
typedef struct {
  struct __pyx_memoryview_obj *memview;
  char *data;
  Py_ssize_t shape[8];
  Py_ssize_t strides[8];
  Py_ssize_t suboffsets[8];
} __Pyx_memviewslice;
#define __Pyx_MemoryView_Len(m)  (m.shape[0])

/* Atomics.proto */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __pyx_atomic_int_type int
#if CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER) && CYTHON_COMPILING_IN_NOGIL
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #pragma intrinsic (_InterlockedExchangeAdd)
    #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif
typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
#if CYTHON_ATOMICS
    #define __pyx_add_acquisition_count(memview)\
             __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
#else
    #define __pyx_add_acquisition_count(memview)\
            __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    #define __pyx_sub_acquisition_count(memview)\
            __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
#endif

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* BufferFormatStructs.proto */
#define IS_UNSIGNED(type) (((type) -1) > 0)
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name;
  struct __Pyx_StructField_* fields;
  size_t size;
  size_t arraysize[8];
  int ndim;
  char typegroup;
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  __Pyx_StructField* field;
  size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  size_t new_count, enc_count;
  size_t struct_alignment;
  int is_complex;
  char enc_type;
  char new_packmode;
  char enc_packmode;
  char is_valid_array;
} __Pyx_BufFmt_Context;


/*--- Type declarations ---*/
struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream;
struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream;
struct __pyx_obj_11apache_beam_6coders_6stream_InputStream;
struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo;
struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue;
struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch;
struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch;
struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all;
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type;
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__;
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__;
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr;
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr;
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr;
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr;
struct __pyx_array_obj;
struct __pyx_MemviewEnum_obj;
struct __pyx_memoryview_obj;
struct __pyx_memoryviewslice_obj;
struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write;
struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write;
struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all;

/* "stream.pxd":26
 *   cdef size_t pos
 * 
 *   cpdef write(self, bytes b, bint nested=*)             # <<<<<<<<<<<<<<
 *   cpdef write_byte(self, unsigned char val)
 *   cpdef write_var_int64(self, libc.stdint.int64_t v)
 */
struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write {
  int __pyx_n;
  int nested;
};

/* "stream.pxd":45
 *   cdef size_t count
 * 
 *   cpdef write(self, bytes b, bint nested=*)             # <<<<<<<<<<<<<<
 *   cpdef write_byte(self, unsigned char val)
 *   cpdef write_bigendian_int64(self, libc.stdint.int64_t val)
 */
struct __pyx_opt_args_11apache_beam_6coders_6stream_24ByteCountingOutputStream_write {
  int __pyx_n;
  int nested;
};

/* "stream.pxd":70
 *   cpdef double read_bigendian_double(self) except? -1
 *   cpdef float read_bigendian_float(self) except? -1
 *   cpdef bytes read_all(self, bint nested=*)             # <<<<<<<<<<<<<<
 * 
 * cpdef libc.stdint.int64_t get_varint_size(libc.stdint.int64_t value)
 */
struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all {
  int __pyx_n;
  int nested;
};
struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create;

/* "windowed_value.pxd":55
 * 
 * @cython.locals(wv=WindowedValue)
 * cpdef WindowedValue create(             # <<<<<<<<<<<<<<
 *   object value, int64_t timestamp_micros, object windows, object pane_info=*)
 * 
 */
struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create {
  int __pyx_n;
  PyObject *pane_info;
};
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size;

/* "apache_beam/coders/coder_impl.pxd":31
 *   libc.stdint.int64_t abs "llabs"(libc.stdint.int64_t)
 * 
 * ctypedef char* char_ptr             # <<<<<<<<<<<<<<
 * 
 * from .stream cimport InputStream, OutputStream
 */
typedef char *__pyx_t_11apache_beam_6coders_10coder_impl_char_ptr;

/* "apache_beam/coders/coder_impl.pxd":50
 *   cpdef bytes encode_nested(self, value)
 *   cpdef decode_nested(self, bytes encoded)
 *   cpdef estimate_size(self, value, bint nested=?)             # <<<<<<<<<<<<<<
 *   @cython.locals(varint_size=int, bits=libc.stdint.uint64_t)
 *   @cython.overflowcheck(False)
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.pxd":54
 *   @cython.overflowcheck(False)
 *   cpdef int _get_nested_size(self, int inner_size, bint nested)
 *   cpdef get_estimated_size_and_observables(self, value, bint nested=?)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.pxd":150
 * 
 *   @cython.locals(c=CoderImpl)
 *   cpdef get_estimated_size_and_observables(self, value, bint nested=?)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.pxd":201
 *   @cython.locals(typed_value=windowed_value._IntervalWindowBase,
 *                  span_millis=libc.stdint.int64_t)
 *   cpdef estimate_size(self, value, bint nested=?)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.pxd":234
 * 
 *   @cython.locals(c=CoderImpl)
 *   cpdef get_estimated_size_and_observables(self, value, bint nested=?)             # <<<<<<<<<<<<<<
 * 
 *   @cython.locals(timestamp=libc.stdint.int64_t)
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":243
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":282
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return self._get_nested_size(self._size_estimator(value), nested)
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":286
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     # TODO(robertwb): Remove this once all coders are correct.
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":372
 *     _ITERABLE_LIKE_TYPES.add(t)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     if isinstance(value, observable.ObservableMixin):
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":661
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that booleans are encoded the same way regardless of nesting.
 *     return 1
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":715
 *     return result
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     estimate = 4  # 4 bytes for int32 size prefix
 *     for key, value in unused_value.items():
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":771
 *     return in_stream.read_bigendian_int16()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A short is encoded as 2 bytes, regardless of nesting.
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":787
 *     return in_stream.read_bigendian_float()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A float is encoded as 4 bytes, regardless of nesting.
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":803
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A double is encoded as 8 bytes, regardless of nesting.
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":884
 *     return Timestamp(micros=millis * 1000)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of
 *     # nesting.
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":971
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # Note that VarInts are encoded the same way regardless of nesting.
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":999
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return 0
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":1037
 *     ])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":1240
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":1248
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":1410
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":1547
 *         value, self._timestamp, self._windows, self._pane_info)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     if isinstance(value, observable.ObservableMixin):
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":1582
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     value_size = self._value_coder.estimate_size(value)
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "stream.pxd":21
 * 
 * 
 * cdef class OutputStream(object):             # <<<<<<<<<<<<<<
 *   cdef char* data
 *   cdef size_t buffer_size
 */
struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *__pyx_vtab;
  char *data;
  size_t buffer_size;
  size_t pos;
};


/* "stream.pxd":42
 * 
 * 
 * cdef class ByteCountingOutputStream(OutputStream):             # <<<<<<<<<<<<<<
 *   cdef size_t count
 * 
 */
struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream {
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream __pyx_base;
  size_t count;
};


/* "stream.pxd":55
 * 
 * 
 * cdef class InputStream(object):             # <<<<<<<<<<<<<<
 *   cdef size_t pos
 *   cdef bytes all
 */
struct __pyx_obj_11apache_beam_6coders_6stream_InputStream {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *__pyx_vtab;
  size_t pos;
  PyObject *all;
  char *allc;
};


/* "windowed_value.pxd":28
 * 
 * @cython.final
 * cdef class PaneInfo(object):             # <<<<<<<<<<<<<<
 *   cdef readonly bint _is_first
 *   cdef readonly bint _is_last
 */
struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo {
  PyObject_HEAD
  int _is_first;
  int _is_last;
  int _timing;
  int _index;
  int _nonspeculative_index;
  unsigned char _encoded_byte;
};


/* "windowed_value.pxd":37
 * 
 * @cython.final
 * cdef class WindowedValue(object):             # <<<<<<<<<<<<<<
 *   cdef public object value
 *   cdef public object windows
 */
struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtab;
  PyObject *value;
  PyObject *windows;
  PyObject *pane_info;
  int64_t timestamp_micros;
  PyObject *timestamp_object;
};


/* "windowed_value.pxd":46
 *   cpdef WindowedValue with_value(self, new_value)
 * 
 * cdef class WindowedBatch(object):             # <<<<<<<<<<<<<<
 *   cpdef WindowedBatch with_values(self, object new_values)
 * 
 */
struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtab;
};


/* "windowed_value.pxd":49
 *   cpdef WindowedBatch with_values(self, object new_values)
 * 
 * cdef class HomogeneousWindowedBatch(WindowedBatch):             # <<<<<<<<<<<<<<
 *   cdef public WindowedValue _wv
 * 
 */
struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base;
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *_wv;
};


/* "windowed_value.pxd":59
 * 
 * 
 * cdef class _IntervalWindowBase(object):             # <<<<<<<<<<<<<<
 *   cdef object _start_object
 *   cdef readonly int64_t _start_micros
 */
struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase {
  PyObject_HEAD
  PyObject *_start_object;
  int64_t _start_micros;
  PyObject *_end_object;
  int64_t _end_micros;
};


/* "apache_beam/coders/coder_impl.pxd":43
 * cdef bint is_compiled
 * 
 * cdef class CoderImpl(object):             # <<<<<<<<<<<<<<
 *   cpdef encode_to_stream(self, value, OutputStream stream, bint nested)
 *   cpdef decode_from_stream(self, InputStream stream, bint nested)
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_vtab;
};


/* "apache_beam/coders/coder_impl.pxd":57
 * 
 * 
 * cdef class SimpleCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":61
 * 
 * 
 * cdef class StreamCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":65
 * 
 * 
 * cdef class CallbackCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   cdef object _encoder
 *   cdef object _decoder
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
  PyObject *_encoder;
  PyObject *_decoder;
  PyObject *_size_estimator;
};


/* "apache_beam/coders/coder_impl.pxd":80
 * cdef set _ITERABLE_LIKE_TYPES
 * 
 * cdef class FastPrimitivesCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef CoderImpl fallback_coder_impl
 *   cdef CoderImpl iterable_coder_impl
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *fallback_coder_impl;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *iterable_coder_impl;
  PyObject *requires_deterministic_step_label;
  int warn_deterministic_fallback;
};


/* "apache_beam/coders/coder_impl.pxd":98
 * 
 * 
 * cdef class MapCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef CoderImpl _key_coder
 *   cdef CoderImpl _value_coder
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_key_coder;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_value_coder;
  int _is_deterministic;
};


/* "apache_beam/coders/coder_impl.pxd":104
 * 
 * 
 * cdef class BytesCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":108
 * 
 * 
 * cdef class BooleanCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":112
 * 
 * 
 * cdef class BigEndianShortCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":116
 * 
 * 
 * cdef class SinglePrecisionFloatCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":120
 * 
 * 
 * cdef class FloatCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":124
 * 
 * 
 * cdef class TimestampCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef object timestamp_class
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  PyObject *timestamp_class;
};


/* "apache_beam/coders/coder_impl.pxd":129
 * 
 * cdef list small_ints
 * cdef class VarIntCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   @cython.locals(ivalue=libc.stdint.int64_t)
 *   cpdef bytes encode(self, value)
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":134
 * 
 * 
 * cdef class SingletonCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   cdef object _value
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
  PyObject *_value;
};


/* "apache_beam/coders/coder_impl.pxd":138
 * 
 * 
 * cdef class AbstractComponentCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef tuple _coder_impls
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  PyObject *_coder_impls;
};


/* "apache_beam/coders/coder_impl.pxd":153
 * 
 * 
 * cdef class TupleCoderImpl(AbstractComponentCoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":157
 * 
 * 
 * cdef class SequenceCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef CoderImpl _elem_coder
 *   cdef object _read_state
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_elem_coder;
  PyObject *_read_state;
  PyObject *_write_state;
  int _write_state_threshold;
};


/* "apache_beam/coders/coder_impl.pxd":170
 * 
 * 
 * cdef class TupleSequenceCoderImpl(SequenceCoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":174
 * 
 * 
 * cdef class _AbstractIterable:             # <<<<<<<<<<<<<<
 *   cdef object _contents
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable {
  PyObject_HEAD
  PyObject *_contents;
};


/* "apache_beam/coders/coder_impl.pxd":178
 * 
 * 
 * cdef class IterableCoderImpl(SequenceCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef bint _use_abstract_iterable
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base;
  int _use_abstract_iterable;
};


/* "apache_beam/coders/coder_impl.pxd":182
 * 
 * 
 * cdef class ListCoderImpl(SequenceCoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":188
 * cdef object IntervalWindow
 * 
 * cdef class IntervalWindowCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef libc.stdint.uint64_t _to_normal_time(self, libc.stdint.int64_t value)
 *   cdef libc.stdint.int64_t _from_normal_time(self, libc.stdint.uint64_t value)
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":208
 * 
 * 
 * cdef class PaneInfoCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef int _choose_encoding(self, windowed_value.PaneInfo value)
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":223
 * 
 * 
 * cdef class WindowedValueCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """A coder for windowed values."""
 *   cdef CoderImpl _value_coder
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_value_coder;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_timestamp_coder;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_windows_coder;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_pane_info_coder;
};


/* "apache_beam/coders/coder_impl.pxd":243
 * 
 * 
 * cdef class ParamWindowedValueCoderImpl(WindowedValueCoderImpl):             # <<<<<<<<<<<<<<
 *   """A coder for windowed values with constant timestamp, windows and pane info."""
 *   cdef readonly libc.stdint.int64_t _timestamp
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl __pyx_base;
  int64_t _timestamp;
  PyObject *_windows;
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *_pane_info;
};


/* "apache_beam/coders/coder_impl.pxd":250
 * 
 * 
 * cdef class LengthPrefixCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef CoderImpl _value_coder
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_value_coder;
};


/* "apache_beam/coders/coder_impl.pxd":254
 * 
 * 
 * cdef class RowColumnEncoder:             # <<<<<<<<<<<<<<
 *   cdef bint encode_to_stream(self, size_t index, OutputStream stream) except -1
 *   cdef bint decode_from_stream(self, size_t index, InputStream stream) except -1
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_vtab;
};


/* "apache_beam/coders/coder_impl.pxd":259
 * 
 * 
 * cdef class GenericRowColumnEncoder(RowColumnEncoder):             # <<<<<<<<<<<<<<
 *   cdef object column
 *   cdef CoderImpl coder_impl
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_base;
  PyObject *column;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *coder_impl;
};


/* "apache_beam/coders/coder_impl.pxd":264
 * 
 * 
 * cdef class RowCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef object schema
 *   cdef int num_fields
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  PyObject *schema;
  int num_fields;
  PyObject *field_names;
  PyObject *field_nullable;
  PyObject *constructor;
  PyObject *encoding_positions;
  PyObject *encoding_positions_argsort;
  int encoding_positions_are_trivial;
  PyObject *components;
  int has_nullable_fields;
};


/* "apache_beam/coders/coder_impl.pxd":294
 * 
 * 
 * cdef class LogicalTypeCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef object logical_type
 *   cdef CoderImpl representation_coder
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  PyObject *logical_type;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *representation_coder;
};


/* "apache_beam/coders/coder_impl.pxd":302
 * 
 * 
 * cdef class BigIntegerCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":306
 * 
 * 
 * cdef class DecimalCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.py":161
 *     return out.get()
 * 
 *   def decode_all(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Iterator[Any]
 *     input_stream = create_InputStream(encoded)
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all {
  PyObject_HEAD
  PyObject *__pyx_v_encoded;
  PyObject *__pyx_v_input_stream;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self;
};


/* "apache_beam/coders/coder_impl.py":592
 * 
 * 
 * def _unpickle_type(bs):             # <<<<<<<<<<<<<<
 *   t = _unpickled_types.get(bs, None)
 *   if t is None:
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type {
  PyObject_HEAD
  PyObject *__pyx_v_bs;
};


/* "apache_beam/coders/coder_impl.py":1093
 *     self._tail = tail
 * 
 *   def __iter__(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Iterator[Any]
 *     for elem in self._head:
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ {
  PyObject_HEAD
  PyObject *__pyx_v_elem;
  PyObject *__pyx_v_self;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "apache_beam/coders/coder_impl.py":1707
 * class RowCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema, components):             # <<<<<<<<<<<<<<
 *     self.schema = schema
 *     self.num_fields = len(self.schema.fields)
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ {
  PyObject_HEAD
  PyObject *__pyx_v_components;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self;
};


/* "apache_beam/coders/coder_impl.py":1717
 *       # should never be duplicate encoding positions.
 *       enc_posx = list(
 *           set(field.encoding_position for field in self.schema.fields))             # <<<<<<<<<<<<<<
 *       if len(enc_posx) != len(self.schema.fields):
 *         raise ValueError(
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr {
  PyObject_HEAD
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_field;
};


/* "apache_beam/coders/coder_impl.py":1723
 *             but not all fields have encoding_position set''')
 *       self.encoding_positions = list(
 *           field.encoding_position for field in self.schema.fields)             # <<<<<<<<<<<<<<
 *     self.encoding_positions_argsort = list(np.argsort(self.encoding_positions))
 *     self.encoding_positions_are_trivial = self.encoding_positions == list(
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr {
  PyObject_HEAD
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_field;
};


/* "apache_beam/coders/coder_impl.py":1728
 *         range(len(self.encoding_positions)))
 *     self.components = list(
 *         components[self.encoding_positions.index(i)].get_impl()             # <<<<<<<<<<<<<<
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr {
  PyObject_HEAD
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_i;
};


/* "apache_beam/coders/coder_impl.py":1731
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 *         field.type.nullable for field in self.schema.fields)             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr {
  PyObject_HEAD
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_field;
};


/* "View.MemoryView":106
 * 
 * @cname("__pyx_array")
 * cdef class array:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
struct __pyx_array_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_array *__pyx_vtab;
  char *data;
  Py_ssize_t len;
  char *format;
  int ndim;
  Py_ssize_t *_shape;
  Py_ssize_t *_strides;
  Py_ssize_t itemsize;
  PyObject *mode;
  PyObject *_format;
  void (*callback_free_data)(void *);
  int free_data;
  int dtype_is_object;
};


/* "View.MemoryView":280
 * 
 * @cname('__pyx_MemviewEnum')
 * cdef class Enum(object):             # <<<<<<<<<<<<<<
 *     cdef object name
 *     def __init__(self, name):
 */
struct __pyx_MemviewEnum_obj {
  PyObject_HEAD
  PyObject *name;
};


/* "View.MemoryView":331
 * 
 * @cname('__pyx_memoryview')
 * cdef class memoryview(object):             # <<<<<<<<<<<<<<
 * 
 *     cdef object obj
 */
struct __pyx_memoryview_obj {
  PyObject_HEAD
  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
  PyObject *obj;
  PyObject *_size;
  PyObject *_array_interface;
  PyThread_type_lock lock;
  __pyx_atomic_int acquisition_count[2];
  __pyx_atomic_int *acquisition_count_aligned_p;
  Py_buffer view;
  int flags;
  int dtype_is_object;
  __Pyx_TypeInfo *typeinfo;
};


/* "View.MemoryView":967
 * 
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
 *     "Internal class for passing memoryview slices to Python"
 * 
 */
struct __pyx_memoryviewslice_obj {
  struct __pyx_memoryview_obj __pyx_base;
  __Pyx_memviewslice from_slice;
  PyObject *from_object;
  PyObject *(*to_object_func)(char *);
  int (*to_dtype_func)(char *, PyObject *);
};



/* "stream.pxd":21
 * 
 * 
 * cdef class OutputStream(object):             # <<<<<<<<<<<<<<
 *   cdef char* data
 *   cdef size_t buffer_size
 */

struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream {
  PyObject *(*write)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write *__pyx_optional_args);
  PyObject *(*write_byte)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, unsigned char, int __pyx_skip_dispatch);
  PyObject *(*write_var_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch);
  PyObject *(*write_bigendian_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int64_t, int __pyx_skip_dispatch);
  PyObject *(*write_bigendian_uint64)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, uint64_t, int __pyx_skip_dispatch);
  PyObject *(*write_bigendian_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int32_t, int __pyx_skip_dispatch);
  PyObject *(*write_bigendian_int16)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int16_t, int __pyx_skip_dispatch);
  PyObject *(*write_bigendian_double)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, double, int __pyx_skip_dispatch);
  PyObject *(*write_bigendian_float)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, float, int __pyx_skip_dispatch);
  PyObject *(*get)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch);
  size_t (*size)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, size_t);
  PyObject *(*_clear)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream;


/* "stream.pxd":42
 * 
 * 
 * cdef class ByteCountingOutputStream(OutputStream):             # <<<<<<<<<<<<<<
 *   cdef size_t count
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream {
  struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream __pyx_base;
  size_t (*get_count)(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream;


/* "stream.pxd":55
 * 
 * 
 * cdef class InputStream(object):             # <<<<<<<<<<<<<<
 *   cdef size_t pos
 *   cdef bytes all
 */

struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream {
  Py_ssize_t (*size)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  PyObject *(*read)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, size_t, int __pyx_skip_dispatch);
  long (*read_byte)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  int64_t (*read_var_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  int64_t (*read_bigendian_int64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  uint64_t (*read_bigendian_uint64)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  int32_t (*read_bigendian_int32)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  int16_t (*read_bigendian_int16)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  double (*read_bigendian_double)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  float (*read_bigendian_float)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  PyObject *(*read_all)(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all *__pyx_optional_args);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_InputStream;


/* "windowed_value.pxd":37
 * 
 * @cython.final
 * cdef class WindowedValue(object):             # <<<<<<<<<<<<<<
 *   cdef public object value
 *   cdef public object windows
 */

struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*with_value)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue;


/* "windowed_value.pxd":46
 *   cpdef WindowedValue with_value(self, new_value)
 * 
 * cdef class WindowedBatch(object):             # <<<<<<<<<<<<<<
 *   cpdef WindowedBatch with_values(self, object new_values)
 * 
 */

struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *(*with_values)(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch;


/* "windowed_value.pxd":49
 *   cpdef WindowedBatch with_values(self, object new_values)
 * 
 * cdef class HomogeneousWindowedBatch(WindowedBatch):             # <<<<<<<<<<<<<<
 *   cdef public WindowedValue _wv
 * 
 */

struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch {
  struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch *__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch;


/* "apache_beam/coders/coder_impl.py":128
 * 
 * 
 * class CoderImpl(object):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, stream, nested):
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl {
  PyObject *(*encode_to_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch);
  PyObject *(*decode_from_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch);
  PyObject *(*encode)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*decode)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*encode_nested)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*decode_nested)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*estimate_size)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args);
  int (*_get_nested_size)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, int, int, int __pyx_skip_dispatch);
  PyObject *(*get_estimated_size_and_observables)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl;


/* "apache_beam/coders/coder_impl.py":212
 * 
 * 
 * class SimpleCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl;


/* "apache_beam/coders/coder_impl.py":229
 * 
 * 
 * class StreamCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;


/* "apache_beam/coders/coder_impl.py":252
 * 
 * 
 * class CallbackCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl;


/* "apache_beam/coders/coder_impl.py":359
 * 
 * 
 * class FastPrimitivesCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  PyObject *(*encode_special_deterministic)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *);
  PyObject *(*encode_type)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *);
  PyObject *(*decode_type)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl;


/* "apache_beam/coders/coder_impl.py":666
 * 
 * 
 * class MapCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_MapCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl;


/* "apache_beam/coders/coder_impl.py":609
 * 
 * 
 * class BytesCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BytesCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl;


/* "apache_beam/coders/coder_impl.py":635
 * 
 * 
 * class BooleanCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BooleanCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl;


/* "apache_beam/coders/coder_impl.py":761
 * 
 * 
 * class BigEndianShortCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl;


/* "apache_beam/coders/coder_impl.py":777
 * 
 * 
 * class SinglePrecisionFloatCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl;


/* "apache_beam/coders/coder_impl.py":793
 * 
 * 
 * class FloatCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FloatCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl;


/* "apache_beam/coders/coder_impl.py":858
 * 
 * 
 * class TimestampCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl;


/* "apache_beam/coders/coder_impl.py":946
 * 
 * 
 * class VarIntCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarIntCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl;


/* "apache_beam/coders/coder_impl.py":977
 * 
 * 
 * class SingletonCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SingletonCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl;


/* "apache_beam/coders/coder_impl.py":1004
 * 
 * 
 * class AbstractComponentCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  PyObject *(*_extract_components)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_construct_from_components)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl;


/* "apache_beam/coders/coder_impl.py":1078
 * 
 * 
 * class TupleCoderImpl(AbstractComponentCoderImpl):             # <<<<<<<<<<<<<<
 *   """A coder for tuple objects."""
 *   def _extract_components(self, value):
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl;


/* "apache_beam/coders/coder_impl.py":1113
 * 
 * 
 * class SequenceCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  PyObject *(*_construct_from_sequence)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;


/* "apache_beam/coders/coder_impl.py":1276
 * 
 * 
 * class TupleSequenceCoderImpl(SequenceCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl;


/* "apache_beam/coders/coder_impl.py":1314
 * 
 * 
 * class IterableCoderImpl(SequenceCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IterableCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl;


/* "apache_beam/coders/coder_impl.py":1331
 * 
 * 
 * class ListCoderImpl(SequenceCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ListCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl;


/* "apache_beam/coders/coder_impl.py":813
 * 
 * 
 * class IntervalWindowCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  uint64_t (*_to_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, int64_t);
  int64_t (*_from_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, uint64_t);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl;


/* "apache_beam/coders/coder_impl.py":1359
 * 
 * 
 * class PaneInfoCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  int (*_choose_encoding)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl;


/* "apache_beam/coders/coder_impl.py":1424
 * 
 * 
 * class WindowedValueCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  uint64_t (*_to_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, int64_t);
  int64_t (*_from_normal_time)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, uint64_t);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;


/* "apache_beam/coders/coder_impl.py":1519
 * 
 * 
 * class ParamWindowedValueCoderImpl(WindowedValueCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl;


/* "apache_beam/coders/coder_impl.py":1563
 * 
 * 
 * class LengthPrefixCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl;


/* "apache_beam/coders/coder_impl.py":1653
 * 
 * 
 * class RowColumnEncoder:             # <<<<<<<<<<<<<<
 *   ROW_ENCODERS = {1: 12345}
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder {
  int (*encode_to_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *);
  int (*decode_from_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder;


/* "apache_beam/coders/coder_impl.py":1686
 * 
 * 
 * class GenericRowColumnEncoder(RowColumnEncoder):             # <<<<<<<<<<<<<<
 *   def __init__(self, coder_impl, column):
 *     self.coder_impl = coder_impl
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder;


/* "apache_beam/coders/coder_impl.py":1705
 * 
 * 
 * class RowCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema, components):
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
  PyObject *(*decode_batch_from_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch);
  PyObject *(*encode_batch_to_stream)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl;


/* "apache_beam/coders/coder_impl.py":1880
 * 
 * 
 * class LogicalTypeCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   def __init__(self, logical_type, representation_coder):
 *     self.logical_type = logical_type
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl;


/* "apache_beam/coders/coder_impl.py":1894
 * 
 * 
 * class BigIntegerCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl;


/* "apache_beam/coders/coder_impl.py":1915
 * 
 * 
 * class DecimalCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DecimalCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl;


/* "View.MemoryView":106
 * 
 * @cname("__pyx_array")
 * cdef class array:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

struct __pyx_vtabstruct_array {
  PyObject *(*get_memview)(struct __pyx_array_obj *);
};
static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;


/* "View.MemoryView":331
 * 
 * @cname('__pyx_memoryview')
 * cdef class memoryview(object):             # <<<<<<<<<<<<<<
 * 
 *     cdef object obj
 */

struct __pyx_vtabstruct_memoryview {
  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
};
static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;


/* "View.MemoryView":967
 * 
 * @cname('__pyx_memoryviewslice')
 * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
 *     "Internal class for passing memoryview slices to Python"
 * 
 */

struct __pyx_vtabstruct__memoryviewslice {
  struct __pyx_vtabstruct_memoryview __pyx_base;
};
static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;

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

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

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

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

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

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

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

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

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

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

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

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

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

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

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

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

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

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

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

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

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

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* pyfrozenset_new.proto */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it);

/* PySetContains.proto */
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq);

/* py_dict_items.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

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

/* CallUnboundCMethod0.proto */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
    (likely((cfunc)->func) ?\
        (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
         (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
            (PY_VERSION_HEX >= 0x030700A0 ?\
                (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
                (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
          (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
            (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
            (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
               ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
               __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

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

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

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

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

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

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

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

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

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

/* decode_c_string_utf16.proto */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_bytes.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* decode_bytes.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
         PyObject* string, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    return __Pyx_decode_c_bytes(
        PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string),
        start, stop, encoding, errors, decode_func);
}

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

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

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

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

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

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

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

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

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

/* UnicodeAsUCS4.proto */
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);

/* object_ord.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyObject_Ord(c)\
    (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
#else
#define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
#endif
static long __Pyx__PyObject_Ord(PyObject* c);

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

/* DivInt[int64_t].proto */
static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t, int64_t);

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

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

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

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

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

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#else
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

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

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

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

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

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

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

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

/* ModInt[long].proto */
static CYTHON_INLINE long __Pyx_mod_long(long, long);

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

/* py_dict_values.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

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

/* BufferIndexError.proto */
static void __Pyx_RaiseBufferIndexError(int axis);

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

/* MemviewSliceInit.proto */
#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
#define __Pyx_MEMVIEW_DIRECT   1
#define __Pyx_MEMVIEW_PTR      2
#define __Pyx_MEMVIEW_FULL     4
#define __Pyx_MEMVIEW_CONTIG   8
#define __Pyx_MEMVIEW_STRIDED  16
#define __Pyx_MEMVIEW_FOLLOW   32
#define __Pyx_IS_C_CONTIG 1
#define __Pyx_IS_F_CONTIG 2
static int __Pyx_init_memviewslice(
                struct __pyx_memoryview_obj *memview,
                int ndim,
                __Pyx_memviewslice *memviewslice,
                int memview_is_new_reference);
static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);

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

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

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

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* DivInt[Py_ssize_t].proto */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);

/* UnaryNegOverflows.proto */
#define UNARY_NEG_WOULD_OVERFLOW(x)\
        (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))

static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

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

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

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

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

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

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

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

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

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

/* Globals.proto */
static PyObject* __Pyx_Globals(void);

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

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

/* ClassMethod.proto */
#include "descrobject.h"
static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method);

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

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

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

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

#if PY_MAJOR_VERSION < 3
    static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    static void __Pyx_ReleaseBuffer(Py_buffer *view);
#else
    #define __Pyx_GetBuffer PyObject_GetBuffer
    #define __Pyx_ReleaseBuffer PyBuffer_Release
#endif


/* BufferStructDeclare.proto */
typedef struct {
  Py_ssize_t shape, strides, suboffsets;
} __Pyx_Buf_DimInfo;
typedef struct {
  size_t refcount;
  Py_buffer pybuffer;
} __Pyx_Buffer;
typedef struct {
  __Pyx_Buffer *rcbuffer;
  char *data;
  __Pyx_Buf_DimInfo diminfo[8];
} __Pyx_LocalBuf_ND;

/* MemviewSliceIsContig.proto */
static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);

/* OverlappingSlices.proto */
static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
                                __Pyx_memviewslice *slice2,
                                int ndim, size_t itemsize);

/* Capsule.proto */
static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);

/* IsLittleEndian.proto */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);

/* BufferFormatCheck.proto */
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type);

/* TypeInfoCompare.proto */
static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);

/* MemviewSliceValidateAndInit.proto */
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn_uint8_t(PyObject *, int writable_flag);

/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn_uint8_t(PyObject *, int writable_flag);

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

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

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

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

/* MemviewSliceCopyTemplate.proto */
static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object);

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

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int16_t __Pyx_PyInt_As_int16_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

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

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

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

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

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

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

/* FunctionImport.proto */
static int __Pyx_ImportFunction_0_29_36(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

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

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static int __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl__get_nested_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, int __pyx_v_inner_size, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_special_deterministic(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_type(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_type(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_dict_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static uint64_t __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, int64_t __pyx_v_value); /* proto*/
static int64_t __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, uint64_t __pyx_v_value); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__extract_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__construct_from_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__construct_from_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17IterableCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl__choose_encoding(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_value); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static uint64_t __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, int64_t __pyx_v_value); /* proto*/
static int64_t __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, uint64_t __pyx_v_value); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static int __pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED size_t __pyx_v_index, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out); /* proto*/
static int __pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED size_t __pyx_v_index, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream); /* proto*/
static int __pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out); /* proto*/
static int __pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_batch_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_batch_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_dest, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/

/* Module declarations from 'cython.view' */

/* Module declarations from 'cython' */

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

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

/* Module declarations from '__builtin__' */

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

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

/* Module declarations from 'cpython' */

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

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

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

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

/* Module declarations from 'libc' */

/* Module declarations from 'apache_beam.coders.stream' */
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_OutputStream = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_6stream_InputStream = 0;

/* Module declarations from 'apache_beam.utils' */

/* Module declarations from 'apache_beam.utils.windowed_value' */
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = 0;
static PyTypeObject **__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp = 0;
#define __pyx_v_11apache_beam_5utils_14windowed_value_Timestamp (*__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp)
static PyObject **__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO = 0;
#define __pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO (*__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO)
static struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(*__pyx_f_11apache_beam_5utils_14windowed_value_create)(PyObject *, int64_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create *__pyx_optional_args); /*proto*/

/* Module declarations from 'apache_beam.coders.coder_impl' */
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr = 0;
static PyTypeObject *__pyx_array_type = 0;
static PyTypeObject *__pyx_MemviewEnum_type = 0;
static PyTypeObject *__pyx_memoryview_type = 0;
static PyTypeObject *__pyx_memoryviewslice_type = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_loads = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_dumps = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_past_unicode = 0;
static int __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_NoneType = 0;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE;
static unsigned char __pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_small_ints = 0;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow = 0;
static int __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN;
static int __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST;
static uint64_t __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT;
static int64_t __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros;
static int64_t __pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros;
static PyObject *__pyx_8genexpr2__pyx_v_11apache_beam_6coders_10coder_impl__;
static PyObject *generic = 0;
static PyObject *strided = 0;
static PyObject *indirect = 0;
static PyObject *contiguous = 0;
static PyObject *indirect_contiguous = 0;
static int __pyx_memoryview_thread_locks_used;
static PyThread_type_lock __pyx_memoryview_thread_locks[8];
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SimpleCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_StreamCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CallbackCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FastPrimitivesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BytesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BooleanCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_MapCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigEndianShortCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FloatCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IntervalWindowCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TimestampCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarIntCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SingletonCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_AbstractComponentCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SequenceCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleSequenceCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__AbstractIterable__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IterableCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ListCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_PaneInfoCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_WindowedValueCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ParamWindowedValueCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LengthPrefixCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_GenericRowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LogicalTypeCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigIntegerCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *, PyObject *); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_DecimalCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *, PyObject *); /*proto*/
static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
static void *__pyx_align_pointer(void *, size_t); /*proto*/
static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
static PyObject *_unellipsify(PyObject *, int); /*proto*/
static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn_uint8_t = { "uint8_t", NULL, sizeof(uint8_t), { 0 }, 0, IS_UNSIGNED(uint8_t) ? 'U' : 'I', IS_UNSIGNED(uint8_t), 0 };
#define __Pyx_MODULE_NAME "apache_beam.coders.coder_impl"
extern int __pyx_module_is_main_apache_beam__coders__coder_impl;
int __pyx_module_is_main_apache_beam__coders__coder_impl = 0;

/* Implementation of 'apache_beam.coders.coder_impl' */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_OverflowError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_chr;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_Ellipsis;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_IndexError;
static const char __pyx_k_O[] = "O";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_x[] = "x";
static const char __pyx_k__2[] = "]";
static const char __pyx_k__3[] = "'";
static const char __pyx_k__4[] = "\001";
static const char __pyx_k__5[] = "\000";
static const char __pyx_k__7[] = "";
static const char __pyx_k_bs[] = "bs";
static const char __pyx_k_eq[] = "__eq__";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_in[] = "in_";
static const char __pyx_k_io[] = "io";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_pb[] = "_pb";
static const char __pyx_k_wv[] = "wv";
static const char __pyx_k_Any[] = "Any";
static const char __pyx_k_Set[] = "Set";
static const char __pyx_k__12[] = "...";
static const char __pyx_k__13[] = ", ";
static const char __pyx_k_any[] = "any";
static const char __pyx_k_big[] = "big";
static const char __pyx_k_buf[] = "buf";
static const char __pyx_k_chr[] = "chr";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_int[] = "int";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_len[] = "__len__";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_sum[] = "sum";
static const char __pyx_k_typ[] = "typ";
static const char __pyx_k_Dict[] = "Dict";
static const char __pyx_k_Enum[] = "Enum";
static const char __pyx_k_List[] = "List";
static const char __pyx_k_Type[] = "Type";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_axis[] = "axis";
static const char __pyx_k_base[] = "__base__";
static const char __pyx_k_dest[] = "dest";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_dill[] = "dill";
static const char __pyx_k_elem[] = "elem";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_hash[] = "__hash__";
static const char __pyx_k_head[] = "head";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_iter[] = "__iter__";
static const char __pyx_k_json[] = "json";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_ndim[] = "ndim";
static const char __pyx_k_pack[] = "pack";
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_step[] = "step";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_tail[] = "tail";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_ASCII[] = "ASCII";
static const char __pyx_k_EARLY[] = "EARLY";
static const char __pyx_k_FIRST[] = "FIRST";
static const char __pyx_k_Timer[] = "Timer";
static const char __pyx_k_Tuple[] = "Tuple";
static const char __pyx_k_bytes[] = "bytes_";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_dumps[] = "dumps";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_flags[] = "flags";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_loads[] = "loads";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_other[] = "other";
static const char __pyx_k_proto[] = "proto";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_shape[] = "shape";
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_throw[] = "throw";
static const char __pyx_k_uint8[] = "uint8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_zeros[] = "zeros";
static const char __pyx_k_LOGGER[] = "_LOGGER";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_astype[] = "astype";
static const char __pyx_k_base_2[] = "base";
static const char __pyx_k_column[] = "column";
static const char __pyx_k_create[] = "create";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_fields[] = "fields";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_frozen[] = "frozen";
static const char __pyx_k_head_2[] = "_head";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_islice[] = "islice";
static const char __pyx_k_lambda[] = "<lambda>";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_micros[] = "micros";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_nested[] = "nested";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_record[] = "record";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_scaleb[] = "scaleb";
static const char __pyx_k_schema[] = "schema";
static const char __pyx_k_signed[] = "signed";
static const char __pyx_k_stream[] = "stream";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_tail_2[] = "_tail";
static const char __pyx_k_timing[] = "timing";
static const char __pyx_k_typing[] = "typing";
static const char __pyx_k_unpack[] = "unpack";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_BytesIO[] = "BytesIO";
static const char __pyx_k_Decimal[] = "Decimal";
static const char __pyx_k_UNKNOWN[] = "UNKNOWN";
static const char __pyx_k_argsort[] = "argsort";
static const char __pyx_k_columns[] = "columns";
static const char __pyx_k_decimal[] = "decimal";
static const char __pyx_k_decoder[] = "decoder";
static const char __pyx_k_encoded[] = "encoded";
static const char __pyx_k_encoder[] = "encoder";
static const char __pyx_k_fortran[] = "fortran";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_is_last[] = "is_last";
static const char __pyx_k_latin_1[] = "latin-1";
static const char __pyx_k_logging[] = "logging";
static const char __pyx_k_memview[] = "memview";
static const char __pyx_k_ndarray[] = "ndarray";
static const char __pyx_k_of_type[] = "' of type '";
static const char __pyx_k_payload[] = "payload";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_warning[] = "warning";
static const char __pyx_k_windows[] = "windows";
static const char __pyx_k_Callable[] = "Callable";
static const char __pyx_k_Ellipsis[] = "Ellipsis";
static const char __pyx_k_INT_TYPE[] = "INT_TYPE";
static const char __pyx_k_Iterable[] = "Iterable";
static const char __pyx_k_Iterator[] = "Iterator";
static const char __pyx_k_NoneType[] = "NoneType";
static const char __pyx_k_Optional[] = "Optional";
static const char __pyx_k_SET_TYPE[] = "SET_TYPE";
static const char __pyx_k_Sequence[] = "Sequence";
static const char __pyx_k_as_tuple[] = "as_tuple";
static const char __pyx_k_contents[] = "contents";
static const char __pyx_k_exponent[] = "exponent";
static const char __pyx_k_fastavro[] = "fastavro";
static const char __pyx_k_fields_2[] = "_fields";
static const char __pyx_k_get_impl[] = "get_impl";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_getvalue[] = "getvalue";
static const char __pyx_k_is_first[] = "is_first";
static const char __pyx_k_itemsize[] = "itemsize";
static const char __pyx_k_nullable[] = "nullable";
static const char __pyx_k_paneinfo[] = "paneinfo";
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_register[] = "register";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_shard_id[] = "_shard_id";
static const char __pyx_k_to_bytes[] = "to_bytes";
static const char __pyx_k_user_key[] = "user_key";
static const char __pyx_k_BOOL_TYPE[] = "BOOL_TYPE";
static const char __pyx_k_CoderImpl[] = "CoderImpl";
static const char __pyx_k_DICT_TYPE[] = "DICT_TYPE";
static const char __pyx_k_ENUM_TYPE[] = "ENUM_TYPE";
static const char __pyx_k_LIST_TYPE[] = "LIST_TYPE";
static const char __pyx_k_NONE_TYPE[] = "NONE_TYPE";
static const char __pyx_k_ONE_INDEX[] = "ONE_INDEX";
static const char __pyx_k_Timestamp[] = "Timestamp";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_byteorder[] = "byteorder";
static const char __pyx_k_clear_bit[] = "clear_bit";
static const char __pyx_k_decoder_2[] = ", decoder=";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_fillvalue[] = "fillvalue";
static const char __pyx_k_getLogger[] = "getLogger";
static const char __pyx_k_get_count[] = "get_count";
static const char __pyx_k_in_stream[] = "in_stream";
static const char __pyx_k_itertools[] = "itertools";
static const char __pyx_k_key_coder[] = "key_coder";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_pane_info[] = "pane_info";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_read_byte[] = "read_byte";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_timestamp[] = "timestamp";
static const char __pyx_k_userstate[] = "userstate";
static const char __pyx_k_AvroRecord[] = "AvroRecord";
static const char __pyx_k_BYTES_TYPE[] = "BYTES_TYPE";
static const char __pyx_k_FLOAT_TYPE[] = "FLOAT_TYPE";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_PROTO_TYPE[] = "PROTO_TYPE";
static const char __pyx_k_ShardedKey[] = "ShardedKey";
static const char __pyx_k_TIME_SHIFT[] = "_TIME_SHIFT";
static const char __pyx_k_TUPLE_TYPE[] = "TUPLE_TYPE";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_bit_length[] = "bit_length";
static const char __pyx_k_coder_impl[] = "coder_impl";
static const char __pyx_k_components[] = "components";
static const char __pyx_k_decode_all[] = "decode_all";
static const char __pyx_k_dict_value[] = "dict_value";
static const char __pyx_k_elem_coder[] = "elem_coder";
static const char __pyx_k_encode_all[] = "encode_all";
static const char __pyx_k_field_type[] = "field_type";
static const char __pyx_k_from_bytes[] = "from_bytes";
static const char __pyx_k_from_proto[] = "_from_proto";
static const char __pyx_k_inner_size[] = "inner_size";
static const char __pyx_k_null_flags[] = "null_flags";
static const char __pyx_k_observable[] = "observable";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_read_state[] = "read_state";
static const char __pyx_k_shard_id_2[] = "shard_id";
static const char __pyx_k_small_ints[] = "small_ints";
static const char __pyx_k_write_byte[] = "write_byte";
static const char __pyx_k_ENCODE_NULL[] = "ENCODE_NULL";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_InputStream[] = "InputStream";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_Observables[] = "Observables";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_SLOW_STREAM[] = "SLOW_STREAM";
static const char __pyx_k_TWO_INDICES[] = "TWO_INDICES";
static const char __pyx_k_atomic_type[] = "atomic_type";
static const char __pyx_k_coder_impls[] = "coder_impls";
static const char __pyx_k_dataclasses[] = "dataclasses";
static const char __pyx_k_deserialize[] = "deserialize";
static const char __pyx_k_is_compiled[] = "is_compiled";
static const char __pyx_k_proto_utils[] = "proto_utils";
static const char __pyx_k_slow_stream[] = "slow_stream";
static const char __pyx_k_value_coder[] = "value_coder";
static const char __pyx_k_write_state[] = "write_state";
static const char __pyx_k_zip_longest[] = "zip_longest";
static const char __pyx_k_MapCoderImpl[] = "MapCoderImpl";
static const char __pyx_k_OutputStream[] = "OutputStream";
static const char __pyx_k_ROW_ENCODERS[] = "ROW_ENCODERS";
static const char __pyx_k_RowCoderImpl[] = "RowCoderImpl";
static const char __pyx_k_StrUtf8Coder[] = "StrUtf8Coder";
static const char __pyx_k_UNICODE_TYPE[] = "UNICODE_TYPE";
static const char __pyx_k_UNKNOWN_TYPE[] = "UNKNOWN_TYPE";
static const char __pyx_k_input_stream[] = "input_stream";
static const char __pyx_k_is_dataclass[] = "is_dataclass";
static const char __pyx_k_logical_type[] = "logical_type";
static const char __pyx_k_parse_schema[] = "parse_schema";
static const char __pyx_k_past_unicode[] = "past_unicode";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_unused_value[] = "unused_value";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_window_coder[] = "window_coder";
static const char __pyx_k_AvroCoderImpl[] = "AvroCoderImpl";
static const char __pyx_k_ListCoderImpl[] = "ListCoderImpl";
static const char __pyx_k_MAX_TIMESTAMP[] = "MAX_TIMESTAMP";
static const char __pyx_k_MIN_TIMESTAMP[] = "MIN_TIMESTAMP";
static const char __pyx_k_OverflowError[] = "OverflowError";
static const char __pyx_k_PicklingError[] = "PicklingError";
static const char __pyx_k_TYPE_CHECKING[] = "TYPE_CHECKING";
static const char __pyx_k_decode_nested[] = "decode_nested";
static const char __pyx_k_deterministic[] = "deterministic";
static const char __pyx_k_encode_nested[] = "encode_nested";
static const char __pyx_k_estimate_size[] = "estimate_size";
static const char __pyx_k_max_timestamp[] = "max_timestamp";
static const char __pyx_k_message_types[] = "message_types";
static const char __pyx_k_parsed_schema[] = "parsed_schema";
static const char __pyx_k_proto_message[] = "proto_message";
static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_unpickle_type[] = "_unpickle_type";
static const char __pyx_k_value_coder_2[] = "_value_coder";
static const char __pyx_k_BytesCoderImpl[] = "BytesCoderImpl";
static const char __pyx_k_ConcatSequence[] = "_ConcatSequence";
static const char __pyx_k_DATACLASS_TYPE[] = "DATACLASS_TYPE";
static const char __pyx_k_ENCODE_PRESENT[] = "ENCODE_PRESENT";
static const char __pyx_k_FloatCoderImpl[] = "FloatCoderImpl";
static const char __pyx_k_IntervalWindow[] = "IntervalWindow";
static const char __pyx_k_PaneInfoTiming[] = "PaneInfoTiming";
static const char __pyx_k_ProtoCoderImpl[] = "ProtoCoderImpl";
static const char __pyx_k_Schema_with_id[] = "Schema with id ";
static const char __pyx_k_TimerCoderImpl[] = "TimerCoderImpl";
static const char __pyx_k_TupleCoderImpl[] = "TupleCoderImpl";
static const char __pyx_k_estimated_size[] = "estimated_size";
static const char __pyx_k_finalize_write[] = "finalize_write";
static const char __pyx_k_fire_timestamp[] = "fire_timestamp";
static const char __pyx_k_hold_timestamp[] = "hold_timestamp";
static const char __pyx_k_key_coder_impl[] = "key_coder_impl";
static const char __pyx_k_null_indicator[] = "null_indicator";
static const char __pyx_k_size_estimator[] = "size_estimator";
static const char __pyx_k_tag_coder_impl[] = "_tag_coder_impl";
static const char __pyx_k_windowed_value[] = "windowed_value";
static const char __pyx_k_ObservableMixin[] = "ObservableMixin";
static const char __pyx_k_ParseFromString[] = "ParseFromString";
static const char __pyx_k_SimpleCoderImpl[] = "SimpleCoderImpl";
static const char __pyx_k_StreamCoderImpl[] = "StreamCoderImpl";
static const char __pyx_k_VarIntCoderImpl[] = "VarIntCoderImpl";
static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
static const char __pyx_k_fits_in_64_bits[] = "fits_in_64_bits";
static const char __pyx_k_get_nested_size[] = "_get_nested_size";
static const char __pyx_k_get_varint_size[] = "get_varint_size";
static const char __pyx_k_proto_plus_type[] = "proto_plus_type";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_timestamp_coder[] = "timestamp_coder";
static const char __pyx_k_unpickled_types[] = "_unpickled_types";
static const char __pyx_k_AbstractIterable[] = "_AbstractIterable";
static const char __pyx_k_BooleanCoderImpl[] = "BooleanCoderImpl";
static const char __pyx_k_CoderImpl_decode[] = "CoderImpl.decode";
static const char __pyx_k_CoderImpl_encode[] = "CoderImpl.encode";
static const char __pyx_k_DecimalCoderImpl[] = "DecimalCoderImpl";
static const char __pyx_k_NAMED_TUPLE_TYPE[] = "NAMED_TUPLE_TYPE";
static const char __pyx_k_PaneInfoEncoding[] = "PaneInfoEncoding";
static const char __pyx_k_RowColumnEncoder[] = "RowColumnEncoder";
static const char __pyx_k_dataclass_params[] = "__dataclass_params__";
static const char __pyx_k_encode_to_stream[] = "encode_to_stream";
static const char __pyx_k_for_the_input_of[] = "' for the input of '";
static const char __pyx_k_is_deterministic[] = "is_deterministic";
static const char __pyx_k_key_coder_impl_2[] = "_key_coder_impl";
static const char __pyx_k_timestamp_micros[] = "timestamp_micros";
static const char __pyx_k_to_language_type[] = "to_language_type";
static const char __pyx_k_CallbackCoderImpl[] = "CallbackCoderImpl";
static const char __pyx_k_IterableCoderImpl[] = "IterableCoderImpl";
static const char __pyx_k_NESTED_STATE_TYPE[] = "NESTED_STATE_TYPE";
static const char __pyx_k_NullableCoderImpl[] = "NullableCoderImpl";
static const char __pyx_k_PaneInfoCoderImpl[] = "PaneInfoCoderImpl";
static const char __pyx_k_SequenceCoderImpl[] = "SequenceCoderImpl";
static const char __pyx_k_apache_beam_utils[] = "apache_beam.utils";
static const char __pyx_k_dynamic_timer_tag[] = "dynamic_timer_tag";
static const char __pyx_k_encoding_position[] = "encoding_position";
static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
static const char __pyx_k_schemaless_reader[] = "schemaless_reader";
static const char __pyx_k_schemaless_writer[] = "schemaless_writer";
static const char __pyx_k_window_coder_impl[] = "window_coder_impl";
static const char __pyx_k_AbstractIterable_s[] = "_AbstractIterable([%s])";
static const char __pyx_k_BIG_INT_CODER_IMPL[] = "BIG_INT_CODER_IMPL";
static const char __pyx_k_ITERABLE_LIKE_TYPE[] = "ITERABLE_LIKE_TYPE";
static const char __pyx_k_ProtoPlusCoderImpl[] = "ProtoPlusCoderImpl";
static const char __pyx_k_SingletonCoderImpl[] = "SingletonCoderImpl";
static const char __pyx_k_TimestampCoderImpl[] = "TimestampCoderImpl";
static const char __pyx_k_Unknown_type_tag_x[] = "Unknown type tag %x";
static const char __pyx_k_apache_beam_coders[] = "apache_beam.coders";
static const char __pyx_k_boolean_coder_impl[] = "_boolean_coder_impl";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_create_InputStream[] = "create_InputStream";
static const char __pyx_k_decode_from_stream[] = "decode_from_stream";
static const char __pyx_k_extract_components[] = "_extract_components";
static const char __pyx_k_for_the_input_of_2[] = "', for the input of '";
static const char __pyx_k_proto_message_type[] = "proto_message_type";
static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
static const char __pyx_k_windows_coder_impl[] = "_windows_coder_impl";
static const char __pyx_k_BigIntegerCoderImpl[] = "BigIntegerCoderImpl";
static const char __pyx_k_ConcatSequence___eq[] = "_ConcatSequence.__eq__";
static const char __pyx_k_DEFAULT_BUFFER_SIZE[] = "_DEFAULT_BUFFER_SIZE";
static const char __pyx_k_ITERABLE_LIKE_TYPES[] = "_ITERABLE_LIKE_TYPES";
static const char __pyx_k_IterableStateReader[] = "IterableStateReader";
static const char __pyx_k_IterableStateWriter[] = "IterableStateWriter";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_ShardedKeyCoderImpl[] = "ShardedKeyCoderImpl";
static const char __pyx_k_create_OutputStream[] = "create_OutputStream";
static const char __pyx_k_fallback_coder_impl[] = "fallback_coder_impl";
static const char __pyx_k_row_column_encoders[] = "_row_column_encoders";
static const char __pyx_k_shard_id_coder_impl[] = "_shard_id_coder_impl";
static const char __pyx_k_window_coder_impl_2[] = "_window_coder_impl";
static const char __pyx_k_AvroCoderImpl___init[] = "AvroCoderImpl.__init__";
static const char __pyx_k_AvroCoderImpl_decode[] = "AvroCoderImpl.decode";
static const char __pyx_k_AvroCoderImpl_encode[] = "AvroCoderImpl.encode";
static const char __pyx_k_CoderImpl_decode_all[] = "CoderImpl.decode_all";
static const char __pyx_k_CoderImpl_encode_all[] = "CoderImpl.encode_all";
static const char __pyx_k_LogicalTypeCoderImpl[] = "LogicalTypeCoderImpl";
static const char __pyx_k_MAX_TIMESTAMP_micros[] = "MAX_TIMESTAMP_micros";
static const char __pyx_k_MIN_TIMESTAMP_micros[] = "MIN_TIMESTAMP_micros";
static const char __pyx_k_nonspeculative_index[] = "nonspeculative_index";
static const char __pyx_k_pane_info_coder_impl[] = "_pane_info_coder_impl";
static const char __pyx_k_representation_coder[] = "representation_coder";
static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
static const char __pyx_k_timestamp_coder_impl[] = "_timestamp_coder_impl";
static const char __pyx_k_unpickle_named_tuple[] = "_unpickle_named_tuple";
static const char __pyx_k_windowed_value_coder[] = "windowed_value_coder";
static const char __pyx_k_BytesCoderImpl_decode[] = "BytesCoderImpl.decode";
static const char __pyx_k_BytesCoderImpl_encode[] = "BytesCoderImpl.encode";
static const char __pyx_k_ConcatSequence___hash[] = "_ConcatSequence.__hash__";
static const char __pyx_k_ConcatSequence___init[] = "_ConcatSequence.__init__";
static const char __pyx_k_ConcatSequence___iter[] = "_ConcatSequence.__iter__";
static const char __pyx_k_Expected_0_or_1_got_s[] = "Expected 0 or 1, got %s";
static const char __pyx_k_LengthPrefixCoderImpl[] = "LengthPrefixCoderImpl";
static const char __pyx_k_ProtoCoderImpl___init[] = "ProtoCoderImpl.__init__";
static const char __pyx_k_ProtoCoderImpl_decode[] = "ProtoCoderImpl.decode";
static const char __pyx_k_ProtoCoderImpl_encode[] = "ProtoCoderImpl.encode";
static const char __pyx_k_TimerCoderImpl___init[] = "TimerCoderImpl.__init__";
static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
static const char __pyx_k_init___locals_genexpr[] = "__init__.<locals>.genexpr";
static const char __pyx_k_row_coders_registered[] = "row_coders_registered";
static const char __pyx_k_use_abstract_iterable[] = "use_abstract_iterable";
static const char __pyx_k_write_state_threshold[] = "write_state_threshold";
static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
static const char __pyx_k_PaneInfoEncoding_FIRST[] = "PaneInfoEncoding_FIRST";
static const char __pyx_k_PaneInfoTiming_UNKNOWN[] = "PaneInfoTiming_UNKNOWN";
static const char __pyx_k_StreamCoderImpl_decode[] = "StreamCoderImpl.decode";
static const char __pyx_k_StreamCoderImpl_encode[] = "StreamCoderImpl.encode";
static const char __pyx_k_TupleSequenceCoderImpl[] = "TupleSequenceCoderImpl";
static const char __pyx_k_VarIntCoderImpl_decode[] = "VarIntCoderImpl.decode";
static const char __pyx_k_VarIntCoderImpl_encode[] = "VarIntCoderImpl.encode";
static const char __pyx_k_WindowedValueCoderImpl[] = "WindowedValueCoderImpl";
static const char __pyx_k_apache_beam_transforms[] = "apache_beam.transforms";
static const char __pyx_k_default_size_estimator[] = "_default_size_estimator";
static const char __pyx_k_encode_batch_to_stream[] = "encode_batch_to_stream";
static const char __pyx_k_encoding_positions_set[] = "encoding_positions_set";
static const char __pyx_k_pyx_unpickle_CoderImpl[] = "__pyx_unpickle_CoderImpl";
static const char __pyx_k_to_representation_type[] = "to_representation_type";
static const char __pyx_k_BigEndianShortCoderImpl[] = "BigEndianShortCoderImpl";
static const char __pyx_k_BooleanCoderImpl_decode[] = "BooleanCoderImpl.decode";
static const char __pyx_k_BooleanCoderImpl_encode[] = "BooleanCoderImpl.encode";
static const char __pyx_k_CoderImpl_decode_nested[] = "CoderImpl.decode_nested";
static const char __pyx_k_CoderImpl_encode_nested[] = "CoderImpl.encode_nested";
static const char __pyx_k_CoderImpl_estimate_size[] = "CoderImpl.estimate_size";
static const char __pyx_k_ConcatSequence___reduce[] = "_ConcatSequence.__reduce__";
static const char __pyx_k_FastPrimitivesCoderImpl[] = "FastPrimitivesCoderImpl";
static const char __pyx_k_GenericRowColumnEncoder[] = "GenericRowColumnEncoder";
static const char __pyx_k_IntervalWindowCoderImpl[] = "IntervalWindowCoderImpl";
static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
static const char __pyx_k_RowColumnEncoder_create[] = "RowColumnEncoder.create";
static const char __pyx_k_coder_impl_row_encoders[] = "coder_impl_row_encoders";
static const char __pyx_k_construct_from_sequence[] = "_construct_from_sequence";
static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
static const char __pyx_k_named_tuple_from_schema[] = "named_tuple_from_schema";
static const char __pyx_k_ByteCountingOutputStream[] = "ByteCountingOutputStream";
static const char __pyx_k_CallbackCoderImpl_decode[] = "CallbackCoderImpl.decode";
static const char __pyx_k_CallbackCoderImpl_encode[] = "CallbackCoderImpl.encode";
static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
static const char __pyx_k_NullableCoderImpl___init[] = "NullableCoderImpl.__init__";
static const char __pyx_k_SerializePartialToString[] = "SerializePartialToString";
static const char __pyx_k_decode_batch_from_stream[] = "decode_batch_from_stream";
static const char __pyx_k_CallbackCoderImpl_encoder[] = "CallbackCoderImpl[encoder=";
static const char __pyx_k_CoderImpl___reduce_cython[] = "CoderImpl.__reduce_cython__";
static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
static const char __pyx_k_ProtoPlusCoderImpl___init[] = "ProtoPlusCoderImpl.__init__";
static const char __pyx_k_ProtoPlusCoderImpl_decode[] = "ProtoPlusCoderImpl.decode";
static const char __pyx_k_ProtoPlusCoderImpl_encode[] = "ProtoPlusCoderImpl.encode";
static const char __pyx_k_RowColumnEncoder_register[] = "RowColumnEncoder.register";
static const char __pyx_k_SingletonCoderImpl_decode[] = "SingletonCoderImpl.decode";
static const char __pyx_k_SingletonCoderImpl_encode[] = "SingletonCoderImpl.encode";
static const char __pyx_k_apache_beam_coders_coders[] = "apache_beam.coders.coders";
static const char __pyx_k_construct_from_components[] = "_construct_from_components";
static const char __pyx_k_pyx_unpickle_MapCoderImpl[] = "__pyx_unpickle_MapCoderImpl";
static const char __pyx_k_pyx_unpickle_RowCoderImpl[] = "__pyx_unpickle_RowCoderImpl";
static const char __pyx_k_AbstractComponentCoderImpl[] = "AbstractComponentCoderImpl";
static const char __pyx_k_CoderImpl__get_nested_size[] = "CoderImpl._get_nested_size";
static const char __pyx_k_CoderImpl_encode_to_stream[] = "CoderImpl.encode_to_stream";
static const char __pyx_k_Invalid_PaneInfoEncoding_s[] = "Invalid PaneInfoEncoding: %s";
static const char __pyx_k_MapCoderImpl_estimate_size[] = "MapCoderImpl.estimate_size";
static const char __pyx_k_ShardedKeyCoderImpl___init[] = "ShardedKeyCoderImpl.__init__";
static const char __pyx_k_pyx_unpickle_ListCoderImpl[] = "__pyx_unpickle_ListCoderImpl";
static const char __pyx_k_CoderImpl___setstate_cython[] = "CoderImpl.__setstate_cython__";
static const char __pyx_k_DeterministicProtoCoderImpl[] = "DeterministicProtoCoderImpl";
static const char __pyx_k_ParamWindowedValueCoderImpl[] = "ParamWindowedValueCoderImpl";
static const char __pyx_k_RowColumnEncoder_null_flags[] = "RowColumnEncoder.null_flags";
static const char __pyx_k_apache_beam_utils_timestamp[] = "apache_beam.utils.timestamp";
static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
static const char __pyx_k_pyx_unpickle_BytesCoderImpl[] = "__pyx_unpickle_BytesCoderImpl";
static const char __pyx_k_pyx_unpickle_FloatCoderImpl[] = "__pyx_unpickle_FloatCoderImpl";
static const char __pyx_k_pyx_unpickle_TupleCoderImpl[] = "__pyx_unpickle_TupleCoderImpl";
static const char __pyx_k_register_iterable_like_type[] = "register_iterable_like_type";
static const char __pyx_k_unpickle_type_locals_lambda[] = "_unpickle_type.<locals>.<lambda>";
static const char __pyx_k_CoderImpl_decode_from_stream[] = "CoderImpl.decode_from_stream";
static const char __pyx_k_FloatCoderImpl_estimate_size[] = "FloatCoderImpl.estimate_size";
static const char __pyx_k_MapCoderImpl___reduce_cython[] = "MapCoderImpl.__reduce_cython__";
static const char __pyx_k_RowCoderImpl___reduce_cython[] = "RowCoderImpl.__reduce_cython__";
static const char __pyx_k_pyx_unpickle_SimpleCoderImpl[] = "__pyx_unpickle_SimpleCoderImpl";
static const char __pyx_k_pyx_unpickle_StreamCoderImpl[] = "__pyx_unpickle_StreamCoderImpl";
static const char __pyx_k_pyx_unpickle_VarIntCoderImpl[] = "__pyx_unpickle_VarIntCoderImpl";
static const char __pyx_k_ListCoderImpl___reduce_cython[] = "ListCoderImpl.__reduce_cython__";
static const char __pyx_k_MapCoderImpl_encode_to_stream[] = "MapCoderImpl.encode_to_stream";
static const char __pyx_k_RowCoderImpl_encode_to_stream[] = "RowCoderImpl.encode_to_stream";
static const char __pyx_k_SinglePrecisionFloatCoderImpl[] = "SinglePrecisionFloatCoderImpl";
static const char __pyx_k_StreamCoderImpl_estimate_size[] = "StreamCoderImpl.estimate_size";
static const char __pyx_k_The_object_defines___getstate[] = "'. The object defines __getstate__ but not __setstate__.";
static const char __pyx_k_VarIntCoderImpl_estimate_size[] = "VarIntCoderImpl.estimate_size";
static const char __pyx_k_apache_beam_coders_coder_impl[] = "apache_beam.coders.coder_impl";
static const char __pyx_k_apache_beam_transforms_window[] = "apache_beam.transforms.window";
static const char __pyx_k_apache_beam_typehints_schemas[] = "apache_beam.typehints.schemas";
static const char __pyx_k_apache_beam_utils_sharded_key[] = "apache_beam.utils.sharded_key";
static const char __pyx_k_pyx_unpickle_BooleanCoderImpl[] = "__pyx_unpickle_BooleanCoderImpl";
static const char __pyx_k_pyx_unpickle_DecimalCoderImpl[] = "__pyx_unpickle_DecimalCoderImpl";
static const char __pyx_k_pyx_unpickle_RowColumnEncoder[] = "__pyx_unpickle_RowColumnEncoder";
static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
static const char __pyx_k_BooleanCoderImpl_estimate_size[] = "BooleanCoderImpl.estimate_size";
static const char __pyx_k_BytesCoderImpl___reduce_cython[] = "BytesCoderImpl.__reduce_cython__";
static const char __pyx_k_FloatCoderImpl___reduce_cython[] = "FloatCoderImpl.__reduce_cython__";
static const char __pyx_k_MapCoderImpl___setstate_cython[] = "MapCoderImpl.__setstate_cython__";
static const char __pyx_k_RowCoderImpl___setstate_cython[] = "RowCoderImpl.__setstate_cython__";
static const char __pyx_k_TupleCoderImpl___reduce_cython[] = "TupleCoderImpl.__reduce_cython__";
static const char __pyx_k_apache_beam_coders_avro_record[] = "apache_beam.coders.avro_record";
static const char __pyx_k_please_provide_a_type_hint_for[] = "', please provide a type hint for the input of '";
static const char __pyx_k_pyx_unpickle_AbstractComponent[] = "__pyx_unpickle_AbstractComponentCoderImpl";
static const char __pyx_k_pyx_unpickle_BigEndianShortCod[] = "__pyx_unpickle_BigEndianShortCoderImpl";
static const char __pyx_k_pyx_unpickle_BigIntegerCoderIm[] = "__pyx_unpickle_BigIntegerCoderImpl";
static const char __pyx_k_pyx_unpickle_CallbackCoderImpl[] = "__pyx_unpickle_CallbackCoderImpl";
static const char __pyx_k_pyx_unpickle_FastPrimitivesCod[] = "__pyx_unpickle_FastPrimitivesCoderImpl";
static const char __pyx_k_pyx_unpickle_GenericRowColumnE[] = "__pyx_unpickle_GenericRowColumnEncoder";
static const char __pyx_k_pyx_unpickle_IntervalWindowCod[] = "__pyx_unpickle_IntervalWindowCoderImpl";
static const char __pyx_k_pyx_unpickle_IterableCoderImpl[] = "__pyx_unpickle_IterableCoderImpl";
static const char __pyx_k_pyx_unpickle_LengthPrefixCoder[] = "__pyx_unpickle_LengthPrefixCoderImpl";
static const char __pyx_k_pyx_unpickle_LogicalTypeCoderI[] = "__pyx_unpickle_LogicalTypeCoderImpl";
static const char __pyx_k_pyx_unpickle_PaneInfoCoderImpl[] = "__pyx_unpickle_PaneInfoCoderImpl";
static const char __pyx_k_pyx_unpickle_ParamWindowedValu[] = "__pyx_unpickle_ParamWindowedValueCoderImpl";
static const char __pyx_k_pyx_unpickle_SequenceCoderImpl[] = "__pyx_unpickle_SequenceCoderImpl";
static const char __pyx_k_pyx_unpickle_SinglePrecisionFl[] = "__pyx_unpickle_SinglePrecisionFloatCoderImpl";
static const char __pyx_k_pyx_unpickle_SingletonCoderImp[] = "__pyx_unpickle_SingletonCoderImpl";
static const char __pyx_k_pyx_unpickle_TimestampCoderImp[] = "__pyx_unpickle_TimestampCoderImpl";
static const char __pyx_k_pyx_unpickle_TupleSequenceCode[] = "__pyx_unpickle_TupleSequenceCoderImpl";
static const char __pyx_k_pyx_unpickle_WindowedValueCode[] = "__pyx_unpickle_WindowedValueCoderImpl";
static const char __pyx_k_pyx_unpickle__AbstractIterable[] = "__pyx_unpickle__AbstractIterable";
static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
static const char __pyx_k_AbstractIterable___reduce_cytho[] = "_AbstractIterable.__reduce_cython__";
static const char __pyx_k_AbstractIterable___setstate_cyt[] = "_AbstractIterable.__setstate_cython__";
static const char __pyx_k_BigIntegerCoderImpl_decode_from[] = "BigIntegerCoderImpl.decode_from_stream";
static const char __pyx_k_BytesCoderImpl_encode_to_stream[] = "BytesCoderImpl.encode_to_stream";
static const char __pyx_k_CallbackCoderImpl__default_size[] = "CallbackCoderImpl._default_size_estimator";
static const char __pyx_k_CallbackCoderImpl_estimate_size[] = "CallbackCoderImpl.estimate_size";
static const char __pyx_k_CallbackCoderImpl_get_estimated[] = "CallbackCoderImpl.get_estimated_size_and_observables";
static const char __pyx_k_FloatCoderImpl_encode_to_stream[] = "FloatCoderImpl.encode_to_stream";
static const char __pyx_k_LengthPrefixCoderImpl_encode_to[] = "LengthPrefixCoderImpl.encode_to_stream";
static const char __pyx_k_ListCoderImpl___setstate_cython[] = "ListCoderImpl.__setstate_cython__";
static const char __pyx_k_LogicalTypeCoderImpl___setstate[] = "LogicalTypeCoderImpl.__setstate_cython__";
static const char __pyx_k_MapCoderImpl_decode_from_stream[] = "MapCoderImpl.decode_from_stream";
static const char __pyx_k_NullableCoderImpl_estimate_size[] = "NullableCoderImpl.estimate_size";
static const char __pyx_k_PaneInfoCoderImpl_estimate_size[] = "PaneInfoCoderImpl.estimate_size";
static const char __pyx_k_ParamWindowedValueCoderImpl_get[] = "ParamWindowedValueCoderImpl.get_estimated_size_and_observables";
static const char __pyx_k_RowCoderImpl_decode_from_stream[] = "RowCoderImpl.decode_from_stream";
static const char __pyx_k_RowColumnEncoder_finalize_write[] = "RowColumnEncoder.finalize_write";
static const char __pyx_k_SequenceCoderImpl_estimate_size[] = "SequenceCoderImpl.estimate_size";
static const char __pyx_k_SequenceCoderImpl_get_estimated[] = "SequenceCoderImpl.get_estimated_size_and_observables";
static const char __pyx_k_ShardedKeyCoderImpl_decode_from[] = "ShardedKeyCoderImpl.decode_from_stream";
static const char __pyx_k_SimpleCoderImpl___reduce_cython[] = "SimpleCoderImpl.__reduce_cython__";
static const char __pyx_k_SinglePrecisionFloatCoderImpl_2[] = "SinglePrecisionFloatCoderImpl.__reduce_cython__";
static const char __pyx_k_SinglePrecisionFloatCoderImpl_3[] = "SinglePrecisionFloatCoderImpl.__setstate_cython__";
static const char __pyx_k_StreamCoderImpl___reduce_cython[] = "StreamCoderImpl.__reduce_cython__";
static const char __pyx_k_TimerCoderImpl_encode_to_stream[] = "TimerCoderImpl.encode_to_stream";
static const char __pyx_k_TupleSequenceCoderImpl___reduce[] = "TupleSequenceCoderImpl.__reduce_cython__";
static const char __pyx_k_VarIntCoderImpl___reduce_cython[] = "VarIntCoderImpl.__reduce_cython__";
static const char __pyx_k_WindowedValueCoderImpl___reduce[] = "WindowedValueCoderImpl.__reduce_cython__";
static const char __pyx_k_deterministic_encoding_error_ms[] = "_deterministic_encoding_error_msg";
static const char __pyx_k_has_encoding_positions_set_True[] = " has encoding_positions_set=True,\n            but not all fields have encoding_position set";
static const char __pyx_k_iterable_coder_uses_abstract_it[] = "_iterable_coder_uses_abstract_iterable_by_default";
static const char __pyx_k_AbstractComponentCoderImpl___red[] = "AbstractComponentCoderImpl.__reduce_cython__";
static const char __pyx_k_AbstractComponentCoderImpl___set[] = "AbstractComponentCoderImpl.__setstate_cython__";
static const char __pyx_k_AbstractComponentCoderImpl__cons[] = "AbstractComponentCoderImpl._construct_from_components";
static const char __pyx_k_AbstractComponentCoderImpl__extr[] = "AbstractComponentCoderImpl._extract_components";
static const char __pyx_k_AbstractComponentCoderImpl_decod[] = "AbstractComponentCoderImpl.decode_from_stream";
static const char __pyx_k_AbstractComponentCoderImpl_encod[] = "AbstractComponentCoderImpl.encode_to_stream";
static const char __pyx_k_AbstractComponentCoderImpl_estim[] = "AbstractComponentCoderImpl.estimate_size";
static const char __pyx_k_AbstractComponentCoderImpl_get_e[] = "AbstractComponentCoderImpl.get_estimated_size_and_observables";
static const char __pyx_k_Attempted_to_encode_null_for_non[] = "Attempted to encode null for non-nullable field \"{}\".";
static const char __pyx_k_BigEndianShortCoderImpl___reduce[] = "BigEndianShortCoderImpl.__reduce_cython__";
static const char __pyx_k_BigEndianShortCoderImpl___setsta[] = "BigEndianShortCoderImpl.__setstate_cython__";
static const char __pyx_k_BigEndianShortCoderImpl_decode_f[] = "BigEndianShortCoderImpl.decode_from_stream";
static const char __pyx_k_BigEndianShortCoderImpl_encode_t[] = "BigEndianShortCoderImpl.encode_to_stream";
static const char __pyx_k_BigEndianShortCoderImpl_estimate[] = "BigEndianShortCoderImpl.estimate_size";
static const char __pyx_k_BigIntegerCoderImpl___reduce_cyt[] = "BigIntegerCoderImpl.__reduce_cython__";
static const char __pyx_k_BigIntegerCoderImpl___setstate_c[] = "BigIntegerCoderImpl.__setstate_cython__";
static const char __pyx_k_BigIntegerCoderImpl_encode_to_st[] = "BigIntegerCoderImpl.encode_to_stream";
static const char __pyx_k_BooleanCoderImpl___reduce_cython[] = "BooleanCoderImpl.__reduce_cython__";
static const char __pyx_k_BooleanCoderImpl___setstate_cyth[] = "BooleanCoderImpl.__setstate_cython__";
static const char __pyx_k_BooleanCoderImpl_decode_from_str[] = "BooleanCoderImpl.decode_from_stream";
static const char __pyx_k_BooleanCoderImpl_encode_to_strea[] = "BooleanCoderImpl.encode_to_stream";
static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
static const char __pyx_k_BytesCoderImpl___setstate_cython[] = "BytesCoderImpl.__setstate_cython__";
static const char __pyx_k_BytesCoderImpl_decode_from_strea[] = "BytesCoderImpl.decode_from_stream";
static const char __pyx_k_CallbackCoderImpl___reduce_cytho[] = "CallbackCoderImpl.__reduce_cython__";
static const char __pyx_k_CallbackCoderImpl___setstate_cyt[] = "CallbackCoderImpl.__setstate_cython__";
static const char __pyx_k_CallbackCoderImpl_decode_from_st[] = "CallbackCoderImpl.decode_from_stream";
static const char __pyx_k_CallbackCoderImpl_encode_to_stre[] = "CallbackCoderImpl.encode_to_stream";
static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
static const char __pyx_k_Cannot_read_state_written_iterab[] = "Cannot read state-written iterable without state reader.";
static const char __pyx_k_CoderImpl_get_estimated_size_and[] = "CoderImpl.get_estimated_size_and_observables";
static const char __pyx_k_Coder_implementations_The_actual[] = "Coder implementations.\n\nThe actual encode/decode implementations are split off from coders to\nallow conditional (compiled/pure) implementations, which can be used to\nencode many elements with minimal overhead.\n\nThis module may be optionally compiled with Cython, using the corresponding\ncoder_impl.pxd file for type hints.  In particular, because CoderImpls are\nnever pickled and sent across the wire (unlike Coders themselves) the workers\ncan use compiled Impls even if the main program does not (or vice versa).\n\nFor internal use only; no backwards-compatibility guarantees.\n";
static const char __pyx_k_DecimalCoderImpl___reduce_cython[] = "DecimalCoderImpl.__reduce_cython__";
static const char __pyx_k_DecimalCoderImpl___setstate_cyth[] = "DecimalCoderImpl.__setstate_cython__";
static const char __pyx_k_DecimalCoderImpl_decode_from_str[] = "DecimalCoderImpl.decode_from_stream";
static const char __pyx_k_DecimalCoderImpl_encode_to_strea[] = "DecimalCoderImpl.encode_to_stream";
static const char __pyx_k_DeterministicProtoCoderImpl_enco[] = "DeterministicProtoCoderImpl.encode";
static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
static const char __pyx_k_Encountered_unexpected_value_for[] = "Encountered unexpected value for null indicator: '%s'";
static const char __pyx_k_FastPrimitivesCoderImpl___reduce[] = "FastPrimitivesCoderImpl.__reduce_cython__";
static const char __pyx_k_FastPrimitivesCoderImpl___setsta[] = "FastPrimitivesCoderImpl.__setstate_cython__";
static const char __pyx_k_FastPrimitivesCoderImpl__determi[] = "FastPrimitivesCoderImpl._deterministic_encoding_error_msg";
static const char __pyx_k_FastPrimitivesCoderImpl_decode_f[] = "FastPrimitivesCoderImpl.decode_from_stream";
static const char __pyx_k_FastPrimitivesCoderImpl_encode_t[] = "FastPrimitivesCoderImpl.encode_to_stream";
static const char __pyx_k_FastPrimitivesCoderImpl_get_esti[] = "FastPrimitivesCoderImpl.get_estimated_size_and_observables";
static const char __pyx_k_FastPrimitivesCoderImpl_register[] = "FastPrimitivesCoderImpl.register_iterable_like_type";
static const char __pyx_k_FloatCoderImpl___setstate_cython[] = "FloatCoderImpl.__setstate_cython__";
static const char __pyx_k_FloatCoderImpl_decode_from_strea[] = "FloatCoderImpl.decode_from_stream";
static const char __pyx_k_For_internal_use_only_no_backwar[] = "For internal use only; no backwards-compatibility guarantees.";
static const char __pyx_k_GenericRowColumnEncoder___reduce[] = "GenericRowColumnEncoder.__reduce_cython__";
static const char __pyx_k_GenericRowColumnEncoder___setsta[] = "GenericRowColumnEncoder.__setstate_cython__";
static const char __pyx_k_GenericRowColumnEncoder_finalize[] = "GenericRowColumnEncoder.finalize_write";
static const char __pyx_k_GenericRowColumnEncoder_null_fla[] = "GenericRowColumnEncoder.null_flags";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())";
static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
static const char __pyx_k_IntervalWindowCoderImpl___reduce[] = "IntervalWindowCoderImpl.__reduce_cython__";
static const char __pyx_k_IntervalWindowCoderImpl___setsta[] = "IntervalWindowCoderImpl.__setstate_cython__";
static const char __pyx_k_IntervalWindowCoderImpl_decode_f[] = "IntervalWindowCoderImpl.decode_from_stream";
static const char __pyx_k_IntervalWindowCoderImpl_encode_t[] = "IntervalWindowCoderImpl.encode_to_stream";
static const char __pyx_k_IntervalWindowCoderImpl_estimate[] = "IntervalWindowCoderImpl.estimate_size";
static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
static const char __pyx_k_IterableCoderImpl___reduce_cytho[] = "IterableCoderImpl.__reduce_cython__";
static const char __pyx_k_IterableCoderImpl___setstate_cyt[] = "IterableCoderImpl.__setstate_cython__";
static const char __pyx_k_IterableCoderImpl__construct_fro[] = "IterableCoderImpl._construct_from_sequence";
static const char __pyx_k_LengthPrefixCoderImpl___reduce_c[] = "LengthPrefixCoderImpl.__reduce_cython__";
static const char __pyx_k_LengthPrefixCoderImpl___setstate[] = "LengthPrefixCoderImpl.__setstate_cython__";
static const char __pyx_k_LengthPrefixCoderImpl_decode_fro[] = "LengthPrefixCoderImpl.decode_from_stream";
static const char __pyx_k_LengthPrefixCoderImpl_estimate_s[] = "LengthPrefixCoderImpl.estimate_size";
static const char __pyx_k_ListCoderImpl__construct_from_se[] = "ListCoderImpl._construct_from_sequence";
static const char __pyx_k_LogicalTypeCoderImpl___reduce_cy[] = "LogicalTypeCoderImpl.__reduce_cython__";
static const char __pyx_k_LogicalTypeCoderImpl_decode_from[] = "LogicalTypeCoderImpl.decode_from_stream";
static const char __pyx_k_LogicalTypeCoderImpl_encode_to_s[] = "LogicalTypeCoderImpl.encode_to_stream";
static const char __pyx_k_NullableCoderImpl_decode_from_st[] = "NullableCoderImpl.decode_from_stream";
static const char __pyx_k_NullableCoderImpl_encode_to_stre[] = "NullableCoderImpl.encode_to_stream";
static const char __pyx_k_Number_of_components_does_not_ma[] = "Number of components does not match number of coders.";
static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
static const char __pyx_k_PaneInfoCoderImpl___reduce_cytho[] = "PaneInfoCoderImpl.__reduce_cython__";
static const char __pyx_k_PaneInfoCoderImpl___setstate_cyt[] = "PaneInfoCoderImpl.__setstate_cython__";
static const char __pyx_k_PaneInfoCoderImpl_decode_from_st[] = "PaneInfoCoderImpl.decode_from_stream";
static const char __pyx_k_PaneInfoCoderImpl_encode_to_stre[] = "PaneInfoCoderImpl.encode_to_stream";
static const char __pyx_k_ParamWindowedValueCoderImpl___re[] = "ParamWindowedValueCoderImpl.__reduce_cython__";
static const char __pyx_k_ParamWindowedValueCoderImpl___se[] = "ParamWindowedValueCoderImpl.__setstate_cython__";
static const char __pyx_k_ParamWindowedValueCoderImpl__fro[] = "ParamWindowedValueCoderImpl._from_proto";
static const char __pyx_k_ParamWindowedValueCoderImpl_deco[] = "ParamWindowedValueCoderImpl.decode_from_stream";
static const char __pyx_k_ParamWindowedValueCoderImpl_enco[] = "ParamWindowedValueCoderImpl.encode_to_stream";
static const char __pyx_k_RowCoderImpl__row_column_encoder[] = "RowCoderImpl._row_column_encoders";
static const char __pyx_k_RowCoderImpl_decode_batch_from_s[] = "RowCoderImpl.decode_batch_from_stream";
static const char __pyx_k_RowCoderImpl_encode_batch_to_str[] = "RowCoderImpl.encode_batch_to_stream";
static const char __pyx_k_RowColumnEncoder___reduce_cython[] = "RowColumnEncoder.__reduce_cython__";
static const char __pyx_k_RowColumnEncoder___setstate_cyth[] = "RowColumnEncoder.__setstate_cython__";
static const char __pyx_k_SequenceCoderImpl___reduce_cytho[] = "SequenceCoderImpl.__reduce_cython__";
static const char __pyx_k_SequenceCoderImpl___setstate_cyt[] = "SequenceCoderImpl.__setstate_cython__";
static const char __pyx_k_SequenceCoderImpl__construct_fro[] = "SequenceCoderImpl._construct_from_sequence";
static const char __pyx_k_SequenceCoderImpl_decode_from_st[] = "SequenceCoderImpl.decode_from_stream";
static const char __pyx_k_SequenceCoderImpl_encode_to_stre[] = "SequenceCoderImpl.encode_to_stream";
static const char __pyx_k_ShardedKeyCoderImpl_encode_to_st[] = "ShardedKeyCoderImpl.encode_to_stream";
static const char __pyx_k_ShardedKeyCoderImpl_estimate_siz[] = "ShardedKeyCoderImpl.estimate_size";
static const char __pyx_k_SimpleCoderImpl___setstate_cytho[] = "SimpleCoderImpl.__setstate_cython__";
static const char __pyx_k_SimpleCoderImpl_decode_from_stre[] = "SimpleCoderImpl.decode_from_stream";
static const char __pyx_k_SimpleCoderImpl_encode_to_stream[] = "SimpleCoderImpl.encode_to_stream";
static const char __pyx_k_SinglePrecisionFloatCoderImpl_de[] = "SinglePrecisionFloatCoderImpl.decode_from_stream";
static const char __pyx_k_SinglePrecisionFloatCoderImpl_en[] = "SinglePrecisionFloatCoderImpl.encode_to_stream";
static const char __pyx_k_SinglePrecisionFloatCoderImpl_es[] = "SinglePrecisionFloatCoderImpl.estimate_size";
static const char __pyx_k_SingletonCoderImpl___reduce_cyth[] = "SingletonCoderImpl.__reduce_cython__";
static const char __pyx_k_SingletonCoderImpl___setstate_cy[] = "SingletonCoderImpl.__setstate_cython__";
static const char __pyx_k_SingletonCoderImpl_decode_from_s[] = "SingletonCoderImpl.decode_from_stream";
static const char __pyx_k_SingletonCoderImpl_encode_to_str[] = "SingletonCoderImpl.encode_to_stream";
static const char __pyx_k_SingletonCoderImpl_estimate_size[] = "SingletonCoderImpl.estimate_size";
static const char __pyx_k_StreamCoderImpl___setstate_cytho[] = "StreamCoderImpl.__setstate_cython__";
static const char __pyx_k_TimerCoderImpl_decode_from_strea[] = "TimerCoderImpl.decode_from_stream";
static const char __pyx_k_TimestampCoderImpl___reduce_cyth[] = "TimestampCoderImpl.__reduce_cython__";
static const char __pyx_k_TimestampCoderImpl___setstate_cy[] = "TimestampCoderImpl.__setstate_cython__";
static const char __pyx_k_TimestampCoderImpl_decode_from_s[] = "TimestampCoderImpl.decode_from_stream";
static const char __pyx_k_TimestampCoderImpl_encode_to_str[] = "TimestampCoderImpl.encode_to_stream";
static const char __pyx_k_TimestampCoderImpl_estimate_size[] = "TimestampCoderImpl.estimate_size";
static const char __pyx_k_TimestampPrefixingWindowCoderImp[] = "TimestampPrefixingWindowCoderImpl";
static const char __pyx_k_TupleCoderImpl___setstate_cython[] = "TupleCoderImpl.__setstate_cython__";
static const char __pyx_k_TupleCoderImpl__construct_from_c[] = "TupleCoderImpl._construct_from_components";
static const char __pyx_k_TupleCoderImpl__extract_componen[] = "TupleCoderImpl._extract_components";
static const char __pyx_k_TupleSequenceCoderImpl___setstat[] = "TupleSequenceCoderImpl.__setstate_cython__";
static const char __pyx_k_TupleSequenceCoderImpl__construc[] = "TupleSequenceCoderImpl._construct_from_sequence";
static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
static const char __pyx_k_Unable_to_deterministically_enco[] = "Unable to deterministically encode non-frozen '";
static const char __pyx_k_Unable_to_deterministically_orde[] = "Unable to deterministically order keys of dict for '%s'";
static const char __pyx_k_Using_fallback_deterministic_cod[] = "Using fallback deterministic coder for type '%s' in '%s'. ";
static const char __pyx_k_VarIntCoderImpl___setstate_cytho[] = "VarIntCoderImpl.__setstate_cython__";
static const char __pyx_k_VarIntCoderImpl_decode_from_stre[] = "VarIntCoderImpl.decode_from_stream";
static const char __pyx_k_VarIntCoderImpl_encode_to_stream[] = "VarIntCoderImpl.encode_to_stream";
static const char __pyx_k_WindowedValueCoderImpl___setstat[] = "WindowedValueCoderImpl.__setstate_cython__";
static const char __pyx_k_WindowedValueCoderImpl_decode_fr[] = "WindowedValueCoderImpl.decode_from_stream";
static const char __pyx_k_WindowedValueCoderImpl_encode_to[] = "WindowedValueCoderImpl.encode_to_stream";
static const char __pyx_k_WindowedValueCoderImpl_get_estim[] = "WindowedValueCoderImpl.get_estimated_size_and_observables";
static const char __pyx_k_apache_beam_coders_coder_impl_py[] = "apache_beam/coders/coder_impl.py";
static const char __pyx_k_get_estimated_size_and_observabl[] = "get_estimated_size_and_observables";
static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_requires_deterministic_step_labe[] = "requires_deterministic_step_label";
static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
static const char __pyx_k_For_internal_use_only_no_backwar_2[] = "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for typing.Optional objects.";
static const char __pyx_k_For_internal_use_only_no_backwar_3[] = "For internal use only; no backwards-compatibility guarantees.\n\n  Encoding used to describe a PaneInfo descriptor.  A PaneInfo descriptor\n  can be encoded in three different ways: with a single byte (FIRST), with a\n  single byte followed by a varint describing a single index (ONE_INDEX) or\n  with a single byte followed by two varints describing two separate indices:\n  the index and nonspeculative index.\n  ";
static const char __pyx_k_For_internal_use_only_no_backwar_4[] = "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for sharded user keys.\n\n  The encoding and decoding should follow the order:\n      shard id byte string\n      encoded user key\n  ";
static const char __pyx_k_For_internal_use_only_no_backwar_5[] = "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for custom window types, which prefix required max_timestamp to\n  encoded original window.\n\n  The coder encodes and decodes custom window types with following format:\n    window's max_timestamp()\n    encoded window using it's own coder.\n  ";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0xd79bc1f, 0x86660dc, 0xa4a2c07) = (_decoder, _encoder, _size_estimator))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_3[] = "Incompatible checksums (0x%x vs (0x22c2424, 0x0a1844e, 0x621d470) = (fallback_coder_impl, iterable_coder_impl, requires_deterministic_step_label, warn_deterministic_fallback))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_4[] = "Incompatible checksums (0x%x vs (0x00bc84d, 0x3172254, 0xa5c3328) = (_is_deterministic, _key_coder, _value_coder))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_5[] = "Incompatible checksums (0x%x vs (0x11860ce, 0x666ec74, 0x95d62e5) = (timestamp_class))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_6[] = "Incompatible checksums (0x%x vs (0xe106c97, 0xbbd7235, 0x0fab5fa) = (_value))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_7[] = "Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_8[] = "Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_9[] = "Incompatible checksums (0x%x vs (0xcbf6c60, 0x77c43a1, 0x6800c7c) = (_contents))";
static const char __pyx_k_TimestampPrefixingWindowCoderImp_2[] = "TimestampPrefixingWindowCoderImpl.__init__";
static const char __pyx_k_TimestampPrefixingWindowCoderImp_3[] = "TimestampPrefixingWindowCoderImpl.encode_to_stream";
static const char __pyx_k_TimestampPrefixingWindowCoderImp_4[] = "TimestampPrefixingWindowCoderImpl.decode_from_stream";
static const char __pyx_k_TimestampPrefixingWindowCoderImp_5[] = "TimestampPrefixingWindowCoderImpl.estimate_size";
static const char __pyx_k_Unable_to_deterministically_enco_2[] = "Unable to deterministically encode '";
static const char __pyx_k_Unable_to_deterministically_orde_2[] = "Unable to deterministically order element of set for '%s'";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_10[] = "Incompatible checksums (0x%x vs (0x3c5c876, 0xf875643, 0xe4d5390) = (_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_11[] = "Incompatible checksums (0x%x vs (0x7f7a287, 0x6be047d, 0x87e748d) = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_12[] = "Incompatible checksums (0x%x vs (0x861f76a, 0x042c030, 0xc4f2637) = (_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_13[] = "Incompatible checksums (0x%x vs (0x5789e75, 0x7fd8b79, 0x057c964) = (_value_coder))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_14[] = "Incompatible checksums (0x%x vs (0xf452421, 0x6ad26e8, 0xf2b4268) = (coder_impl, column))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_15[] = "Incompatible checksums (0x%x vs (0x0c10601, 0xf2b4193, 0x540fa75) = (components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_16[] = "Incompatible checksums (0x%x vs (0x10f5c41, 0xb7905bf, 0x2e68dea) = (logical_type, representation_coder))";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_17[] = "Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
static PyObject *__pyx_n_s_ASCII;
static PyObject *__pyx_n_s_AbstractComponentCoderImpl;
static PyObject *__pyx_n_s_AbstractComponentCoderImpl___red;
static PyObject *__pyx_n_s_AbstractComponentCoderImpl___set;
static PyObject *__pyx_n_s_AbstractComponentCoderImpl__cons;
static PyObject *__pyx_n_s_AbstractComponentCoderImpl__extr;
static PyObject *__pyx_n_s_AbstractComponentCoderImpl_decod;
static PyObject *__pyx_n_s_AbstractComponentCoderImpl_encod;
static PyObject *__pyx_n_s_AbstractComponentCoderImpl_estim;
static PyObject *__pyx_n_s_AbstractComponentCoderImpl_get_e;
static PyObject *__pyx_n_s_AbstractIterable;
static PyObject *__pyx_n_s_AbstractIterable___reduce_cytho;
static PyObject *__pyx_n_s_AbstractIterable___setstate_cyt;
static PyObject *__pyx_kp_u_AbstractIterable_s;
static PyObject *__pyx_n_s_Any;
static PyObject *__pyx_kp_u_Attempted_to_encode_null_for_non;
static PyObject *__pyx_n_s_AvroCoderImpl;
static PyObject *__pyx_n_s_AvroCoderImpl___init;
static PyObject *__pyx_n_s_AvroCoderImpl_decode;
static PyObject *__pyx_n_s_AvroCoderImpl_encode;
static PyObject *__pyx_n_s_AvroRecord;
static PyObject *__pyx_n_s_BIG_INT_CODER_IMPL;
static PyObject *__pyx_n_s_BOOL_TYPE;
static PyObject *__pyx_n_s_BYTES_TYPE;
static PyObject *__pyx_n_s_BigEndianShortCoderImpl;
static PyObject *__pyx_n_s_BigEndianShortCoderImpl___reduce;
static PyObject *__pyx_n_s_BigEndianShortCoderImpl___setsta;
static PyObject *__pyx_n_s_BigEndianShortCoderImpl_decode_f;
static PyObject *__pyx_n_s_BigEndianShortCoderImpl_encode_t;
static PyObject *__pyx_n_s_BigEndianShortCoderImpl_estimate;
static PyObject *__pyx_n_s_BigIntegerCoderImpl;
static PyObject *__pyx_n_s_BigIntegerCoderImpl___reduce_cyt;
static PyObject *__pyx_n_s_BigIntegerCoderImpl___setstate_c;
static PyObject *__pyx_n_s_BigIntegerCoderImpl_decode_from;
static PyObject *__pyx_n_s_BigIntegerCoderImpl_encode_to_st;
static PyObject *__pyx_n_s_BooleanCoderImpl;
static PyObject *__pyx_n_s_BooleanCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_BooleanCoderImpl___setstate_cyth;
static PyObject *__pyx_n_s_BooleanCoderImpl_decode;
static PyObject *__pyx_n_s_BooleanCoderImpl_decode_from_str;
static PyObject *__pyx_n_s_BooleanCoderImpl_encode;
static PyObject *__pyx_n_s_BooleanCoderImpl_encode_to_strea;
static PyObject *__pyx_n_s_BooleanCoderImpl_estimate_size;
static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
static PyObject *__pyx_n_s_ByteCountingOutputStream;
static PyObject *__pyx_n_u_ByteCountingOutputStream;
static PyObject *__pyx_n_s_BytesCoderImpl;
static PyObject *__pyx_n_s_BytesCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_BytesCoderImpl___setstate_cython;
static PyObject *__pyx_n_s_BytesCoderImpl_decode;
static PyObject *__pyx_n_s_BytesCoderImpl_decode_from_strea;
static PyObject *__pyx_n_s_BytesCoderImpl_encode;
static PyObject *__pyx_n_s_BytesCoderImpl_encode_to_stream;
static PyObject *__pyx_n_s_BytesIO;
static PyObject *__pyx_n_s_Callable;
static PyObject *__pyx_n_s_CallbackCoderImpl;
static PyObject *__pyx_n_s_CallbackCoderImpl___reduce_cytho;
static PyObject *__pyx_n_s_CallbackCoderImpl___setstate_cyt;
static PyObject *__pyx_n_s_CallbackCoderImpl__default_size;
static PyObject *__pyx_n_s_CallbackCoderImpl_decode;
static PyObject *__pyx_n_s_CallbackCoderImpl_decode_from_st;
static PyObject *__pyx_n_s_CallbackCoderImpl_encode;
static PyObject *__pyx_n_s_CallbackCoderImpl_encode_to_stre;
static PyObject *__pyx_kp_u_CallbackCoderImpl_encoder;
static PyObject *__pyx_n_s_CallbackCoderImpl_estimate_size;
static PyObject *__pyx_n_s_CallbackCoderImpl_get_estimated;
static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
static PyObject *__pyx_kp_u_Cannot_read_state_written_iterab;
static PyObject *__pyx_n_s_CoderImpl;
static PyObject *__pyx_n_u_CoderImpl;
static PyObject *__pyx_n_s_CoderImpl___reduce_cython;
static PyObject *__pyx_n_s_CoderImpl___setstate_cython;
static PyObject *__pyx_n_s_CoderImpl__get_nested_size;
static PyObject *__pyx_n_s_CoderImpl_decode;
static PyObject *__pyx_n_s_CoderImpl_decode_all;
static PyObject *__pyx_n_s_CoderImpl_decode_from_stream;
static PyObject *__pyx_n_s_CoderImpl_decode_nested;
static PyObject *__pyx_n_s_CoderImpl_encode;
static PyObject *__pyx_n_s_CoderImpl_encode_all;
static PyObject *__pyx_n_s_CoderImpl_encode_nested;
static PyObject *__pyx_n_s_CoderImpl_encode_to_stream;
static PyObject *__pyx_n_s_CoderImpl_estimate_size;
static PyObject *__pyx_n_s_CoderImpl_get_estimated_size_and;
static PyObject *__pyx_n_s_ConcatSequence;
static PyObject *__pyx_n_s_ConcatSequence___eq;
static PyObject *__pyx_n_s_ConcatSequence___hash;
static PyObject *__pyx_n_s_ConcatSequence___init;
static PyObject *__pyx_n_s_ConcatSequence___iter;
static PyObject *__pyx_n_s_ConcatSequence___reduce;
static PyObject *__pyx_n_s_DATACLASS_TYPE;
static PyObject *__pyx_n_s_DEFAULT_BUFFER_SIZE;
static PyObject *__pyx_n_s_DICT_TYPE;
static PyObject *__pyx_n_s_Decimal;
static PyObject *__pyx_n_s_DecimalCoderImpl;
static PyObject *__pyx_n_s_DecimalCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_DecimalCoderImpl___setstate_cyth;
static PyObject *__pyx_n_s_DecimalCoderImpl_decode_from_str;
static PyObject *__pyx_n_s_DecimalCoderImpl_encode_to_strea;
static PyObject *__pyx_n_s_DeterministicProtoCoderImpl;
static PyObject *__pyx_n_s_DeterministicProtoCoderImpl_enco;
static PyObject *__pyx_n_s_Dict;
static PyObject *__pyx_n_s_EARLY;
static PyObject *__pyx_n_s_ENCODE_NULL;
static PyObject *__pyx_n_s_ENCODE_PRESENT;
static PyObject *__pyx_n_s_ENUM_TYPE;
static PyObject *__pyx_n_s_Ellipsis;
static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
static PyObject *__pyx_kp_u_Encountered_unexpected_value_for;
static PyObject *__pyx_n_s_Enum;
static PyObject *__pyx_kp_u_Expected_0_or_1_got_s;
static PyObject *__pyx_n_s_FIRST;
static PyObject *__pyx_n_s_FLOAT_TYPE;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl___reduce;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl___setsta;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl__determi;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl_decode_f;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl_encode_t;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl_get_esti;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl_register;
static PyObject *__pyx_n_s_FloatCoderImpl;
static PyObject *__pyx_n_s_FloatCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_FloatCoderImpl___setstate_cython;
static PyObject *__pyx_n_s_FloatCoderImpl_decode_from_strea;
static PyObject *__pyx_n_s_FloatCoderImpl_encode_to_stream;
static PyObject *__pyx_n_s_FloatCoderImpl_estimate_size;
static PyObject *__pyx_kp_s_For_internal_use_only_no_backwar;
static PyObject *__pyx_kp_s_For_internal_use_only_no_backwar_2;
static PyObject *__pyx_kp_s_For_internal_use_only_no_backwar_3;
static PyObject *__pyx_kp_s_For_internal_use_only_no_backwar_4;
static PyObject *__pyx_kp_s_For_internal_use_only_no_backwar_5;
static PyObject *__pyx_n_s_GenericRowColumnEncoder;
static PyObject *__pyx_n_s_GenericRowColumnEncoder___reduce;
static PyObject *__pyx_n_s_GenericRowColumnEncoder___setsta;
static PyObject *__pyx_n_s_GenericRowColumnEncoder_finalize;
static PyObject *__pyx_n_s_GenericRowColumnEncoder_null_fla;
static PyObject *__pyx_n_s_INT_TYPE;
static PyObject *__pyx_n_s_ITERABLE_LIKE_TYPE;
static PyObject *__pyx_n_s_ITERABLE_LIKE_TYPES;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_10;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_11;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_12;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_13;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_14;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_15;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_16;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_17;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_8;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_9;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
static PyObject *__pyx_n_s_InputStream;
static PyObject *__pyx_n_s_IntervalWindow;
static PyObject *__pyx_n_s_IntervalWindowCoderImpl;
static PyObject *__pyx_n_s_IntervalWindowCoderImpl___reduce;
static PyObject *__pyx_n_s_IntervalWindowCoderImpl___setsta;
static PyObject *__pyx_n_s_IntervalWindowCoderImpl_decode_f;
static PyObject *__pyx_n_s_IntervalWindowCoderImpl_encode_t;
static PyObject *__pyx_n_s_IntervalWindowCoderImpl_estimate;
static PyObject *__pyx_kp_u_Invalid_PaneInfoEncoding_s;
static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
static PyObject *__pyx_n_s_Iterable;
static PyObject *__pyx_n_s_IterableCoderImpl;
static PyObject *__pyx_n_s_IterableCoderImpl___reduce_cytho;
static PyObject *__pyx_n_s_IterableCoderImpl___setstate_cyt;
static PyObject *__pyx_n_s_IterableCoderImpl__construct_fro;
static PyObject *__pyx_n_s_IterableStateReader;
static PyObject *__pyx_n_s_IterableStateWriter;
static PyObject *__pyx_n_s_Iterator;
static PyObject *__pyx_n_s_LIST_TYPE;
static PyObject *__pyx_n_s_LOGGER;
static PyObject *__pyx_n_s_LengthPrefixCoderImpl;
static PyObject *__pyx_n_s_LengthPrefixCoderImpl___reduce_c;
static PyObject *__pyx_n_s_LengthPrefixCoderImpl___setstate;
static PyObject *__pyx_n_s_LengthPrefixCoderImpl_decode_fro;
static PyObject *__pyx_n_s_LengthPrefixCoderImpl_encode_to;
static PyObject *__pyx_n_s_LengthPrefixCoderImpl_estimate_s;
static PyObject *__pyx_n_s_List;
static PyObject *__pyx_n_s_ListCoderImpl;
static PyObject *__pyx_n_s_ListCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_ListCoderImpl___setstate_cython;
static PyObject *__pyx_n_s_ListCoderImpl__construct_from_se;
static PyObject *__pyx_n_s_LogicalTypeCoderImpl;
static PyObject *__pyx_n_s_LogicalTypeCoderImpl___reduce_cy;
static PyObject *__pyx_n_s_LogicalTypeCoderImpl___setstate;
static PyObject *__pyx_n_s_LogicalTypeCoderImpl_decode_from;
static PyObject *__pyx_n_s_LogicalTypeCoderImpl_encode_to_s;
static PyObject *__pyx_n_s_MAX_TIMESTAMP;
static PyObject *__pyx_n_s_MAX_TIMESTAMP_micros;
static PyObject *__pyx_n_s_MIN_TIMESTAMP;
static PyObject *__pyx_n_s_MIN_TIMESTAMP_micros;
static PyObject *__pyx_n_s_MapCoderImpl;
static PyObject *__pyx_n_s_MapCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_MapCoderImpl___setstate_cython;
static PyObject *__pyx_n_s_MapCoderImpl_decode_from_stream;
static PyObject *__pyx_n_s_MapCoderImpl_encode_to_stream;
static PyObject *__pyx_n_s_MapCoderImpl_estimate_size;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
static PyObject *__pyx_kp_s_MemoryView_of_r_object;
static PyObject *__pyx_n_s_NAMED_TUPLE_TYPE;
static PyObject *__pyx_n_s_NESTED_STATE_TYPE;
static PyObject *__pyx_n_s_NONE_TYPE;
static PyObject *__pyx_n_s_NoneType;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_NullableCoderImpl;
static PyObject *__pyx_n_s_NullableCoderImpl___init;
static PyObject *__pyx_n_s_NullableCoderImpl_decode_from_st;
static PyObject *__pyx_n_s_NullableCoderImpl_encode_to_stre;
static PyObject *__pyx_n_s_NullableCoderImpl_estimate_size;
static PyObject *__pyx_kp_u_Number_of_components_does_not_ma;
static PyObject *__pyx_n_b_O;
static PyObject *__pyx_n_s_ONE_INDEX;
static PyObject *__pyx_n_s_ObservableMixin;
static PyObject *__pyx_n_s_Observables;
static PyObject *__pyx_n_s_Optional;
static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
static PyObject *__pyx_n_s_OutputStream;
static PyObject *__pyx_n_s_OverflowError;
static PyObject *__pyx_n_s_PROTO_TYPE;
static PyObject *__pyx_n_s_PaneInfoCoderImpl;
static PyObject *__pyx_n_s_PaneInfoCoderImpl___reduce_cytho;
static PyObject *__pyx_n_s_PaneInfoCoderImpl___setstate_cyt;
static PyObject *__pyx_n_s_PaneInfoCoderImpl_decode_from_st;
static PyObject *__pyx_n_s_PaneInfoCoderImpl_encode_to_stre;
static PyObject *__pyx_n_s_PaneInfoCoderImpl_estimate_size;
static PyObject *__pyx_n_s_PaneInfoEncoding;
static PyObject *__pyx_n_s_PaneInfoEncoding_FIRST;
static PyObject *__pyx_n_s_PaneInfoTiming;
static PyObject *__pyx_n_s_PaneInfoTiming_UNKNOWN;
static PyObject *__pyx_n_s_ParamWindowedValueCoderImpl;
static PyObject *__pyx_n_s_ParamWindowedValueCoderImpl___re;
static PyObject *__pyx_n_s_ParamWindowedValueCoderImpl___se;
static PyObject *__pyx_n_s_ParamWindowedValueCoderImpl__fro;
static PyObject *__pyx_n_s_ParamWindowedValueCoderImpl_deco;
static PyObject *__pyx_n_s_ParamWindowedValueCoderImpl_enco;
static PyObject *__pyx_n_s_ParamWindowedValueCoderImpl_get;
static PyObject *__pyx_n_s_ParseFromString;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_PicklingError;
static PyObject *__pyx_n_s_ProtoCoderImpl;
static PyObject *__pyx_n_s_ProtoCoderImpl___init;
static PyObject *__pyx_n_s_ProtoCoderImpl_decode;
static PyObject *__pyx_n_s_ProtoCoderImpl_encode;
static PyObject *__pyx_n_s_ProtoPlusCoderImpl;
static PyObject *__pyx_n_s_ProtoPlusCoderImpl___init;
static PyObject *__pyx_n_s_ProtoPlusCoderImpl_decode;
static PyObject *__pyx_n_s_ProtoPlusCoderImpl_encode;
static PyObject *__pyx_n_s_ROW_ENCODERS;
static PyObject *__pyx_n_s_RowCoderImpl;
static PyObject *__pyx_n_s_RowCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_RowCoderImpl___setstate_cython;
static PyObject *__pyx_n_s_RowCoderImpl__row_column_encoder;
static PyObject *__pyx_n_s_RowCoderImpl_decode_batch_from_s;
static PyObject *__pyx_n_s_RowCoderImpl_decode_from_stream;
static PyObject *__pyx_n_s_RowCoderImpl_encode_batch_to_str;
static PyObject *__pyx_n_s_RowCoderImpl_encode_to_stream;
static PyObject *__pyx_n_s_RowColumnEncoder;
static PyObject *__pyx_n_s_RowColumnEncoder___reduce_cython;
static PyObject *__pyx_n_s_RowColumnEncoder___setstate_cyth;
static PyObject *__pyx_n_s_RowColumnEncoder_create;
static PyObject *__pyx_n_s_RowColumnEncoder_finalize_write;
static PyObject *__pyx_n_s_RowColumnEncoder_null_flags;
static PyObject *__pyx_n_s_RowColumnEncoder_register;
static PyObject *__pyx_n_s_SET_TYPE;
static PyObject *__pyx_n_s_SLOW_STREAM;
static PyObject *__pyx_kp_u_Schema_with_id;
static PyObject *__pyx_n_s_Sequence;
static PyObject *__pyx_n_s_SequenceCoderImpl;
static PyObject *__pyx_n_s_SequenceCoderImpl___reduce_cytho;
static PyObject *__pyx_n_s_SequenceCoderImpl___setstate_cyt;
static PyObject *__pyx_n_s_SequenceCoderImpl__construct_fro;
static PyObject *__pyx_n_s_SequenceCoderImpl_decode_from_st;
static PyObject *__pyx_n_s_SequenceCoderImpl_encode_to_stre;
static PyObject *__pyx_n_s_SequenceCoderImpl_estimate_size;
static PyObject *__pyx_n_s_SequenceCoderImpl_get_estimated;
static PyObject *__pyx_n_s_SerializePartialToString;
static PyObject *__pyx_n_s_Set;
static PyObject *__pyx_n_s_ShardedKey;
static PyObject *__pyx_n_s_ShardedKeyCoderImpl;
static PyObject *__pyx_n_s_ShardedKeyCoderImpl___init;
static PyObject *__pyx_n_s_ShardedKeyCoderImpl_decode_from;
static PyObject *__pyx_n_s_ShardedKeyCoderImpl_encode_to_st;
static PyObject *__pyx_n_s_ShardedKeyCoderImpl_estimate_siz;
static PyObject *__pyx_n_s_SimpleCoderImpl;
static PyObject *__pyx_n_s_SimpleCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_SimpleCoderImpl___setstate_cytho;
static PyObject *__pyx_n_s_SimpleCoderImpl_decode_from_stre;
static PyObject *__pyx_n_s_SimpleCoderImpl_encode_to_stream;
static PyObject *__pyx_n_s_SinglePrecisionFloatCoderImpl;
static PyObject *__pyx_n_s_SinglePrecisionFloatCoderImpl_2;
static PyObject *__pyx_n_s_SinglePrecisionFloatCoderImpl_3;
static PyObject *__pyx_n_s_SinglePrecisionFloatCoderImpl_de;
static PyObject *__pyx_n_s_SinglePrecisionFloatCoderImpl_en;
static PyObject *__pyx_n_s_SinglePrecisionFloatCoderImpl_es;
static PyObject *__pyx_n_s_SingletonCoderImpl;
static PyObject *__pyx_n_s_SingletonCoderImpl___reduce_cyth;
static PyObject *__pyx_n_s_SingletonCoderImpl___setstate_cy;
static PyObject *__pyx_n_s_SingletonCoderImpl_decode;
static PyObject *__pyx_n_s_SingletonCoderImpl_decode_from_s;
static PyObject *__pyx_n_s_SingletonCoderImpl_encode;
static PyObject *__pyx_n_s_SingletonCoderImpl_encode_to_str;
static PyObject *__pyx_n_s_SingletonCoderImpl_estimate_size;
static PyObject *__pyx_n_s_StrUtf8Coder;
static PyObject *__pyx_n_s_StreamCoderImpl;
static PyObject *__pyx_n_s_StreamCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_StreamCoderImpl___setstate_cytho;
static PyObject *__pyx_n_s_StreamCoderImpl_decode;
static PyObject *__pyx_n_s_StreamCoderImpl_encode;
static PyObject *__pyx_n_s_StreamCoderImpl_estimate_size;
static PyObject *__pyx_n_s_TIME_SHIFT;
static PyObject *__pyx_n_s_TUPLE_TYPE;
static PyObject *__pyx_n_s_TWO_INDICES;
static PyObject *__pyx_n_s_TYPE_CHECKING;
static PyObject *__pyx_kp_u_The_object_defines___getstate;
static PyObject *__pyx_n_s_Timer;
static PyObject *__pyx_n_s_TimerCoderImpl;
static PyObject *__pyx_n_s_TimerCoderImpl___init;
static PyObject *__pyx_n_s_TimerCoderImpl_decode_from_strea;
static PyObject *__pyx_n_s_TimerCoderImpl_encode_to_stream;
static PyObject *__pyx_n_s_Timestamp;
static PyObject *__pyx_n_s_TimestampCoderImpl;
static PyObject *__pyx_n_s_TimestampCoderImpl___reduce_cyth;
static PyObject *__pyx_n_s_TimestampCoderImpl___setstate_cy;
static PyObject *__pyx_n_s_TimestampCoderImpl_decode_from_s;
static PyObject *__pyx_n_s_TimestampCoderImpl_encode_to_str;
static PyObject *__pyx_n_s_TimestampCoderImpl_estimate_size;
static PyObject *__pyx_n_s_TimestampPrefixingWindowCoderImp;
static PyObject *__pyx_n_s_TimestampPrefixingWindowCoderImp_2;
static PyObject *__pyx_n_s_TimestampPrefixingWindowCoderImp_3;
static PyObject *__pyx_n_s_TimestampPrefixingWindowCoderImp_4;
static PyObject *__pyx_n_s_TimestampPrefixingWindowCoderImp_5;
static PyObject *__pyx_n_s_Tuple;
static PyObject *__pyx_n_s_TupleCoderImpl;
static PyObject *__pyx_n_s_TupleCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_TupleCoderImpl___setstate_cython;
static PyObject *__pyx_n_s_TupleCoderImpl__construct_from_c;
static PyObject *__pyx_n_s_TupleCoderImpl__extract_componen;
static PyObject *__pyx_n_s_TupleSequenceCoderImpl;
static PyObject *__pyx_n_s_TupleSequenceCoderImpl___reduce;
static PyObject *__pyx_n_s_TupleSequenceCoderImpl___setstat;
static PyObject *__pyx_n_s_TupleSequenceCoderImpl__construc;
static PyObject *__pyx_n_s_Type;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_UNICODE_TYPE;
static PyObject *__pyx_n_s_UNKNOWN;
static PyObject *__pyx_n_s_UNKNOWN_TYPE;
static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
static PyObject *__pyx_kp_u_Unable_to_deterministically_enco;
static PyObject *__pyx_kp_u_Unable_to_deterministically_enco_2;
static PyObject *__pyx_kp_u_Unable_to_deterministically_orde;
static PyObject *__pyx_kp_u_Unable_to_deterministically_orde_2;
static PyObject *__pyx_kp_u_Unknown_type_tag_x;
static PyObject *__pyx_kp_u_Using_fallback_deterministic_cod;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_VarIntCoderImpl;
static PyObject *__pyx_n_s_VarIntCoderImpl___reduce_cython;
static PyObject *__pyx_n_s_VarIntCoderImpl___setstate_cytho;
static PyObject *__pyx_n_s_VarIntCoderImpl_decode;
static PyObject *__pyx_n_s_VarIntCoderImpl_decode_from_stre;
static PyObject *__pyx_n_s_VarIntCoderImpl_encode;
static PyObject *__pyx_n_s_VarIntCoderImpl_encode_to_stream;
static PyObject *__pyx_n_s_VarIntCoderImpl_estimate_size;
static PyObject *__pyx_n_s_View_MemoryView;
static PyObject *__pyx_n_s_WindowedValueCoderImpl;
static PyObject *__pyx_n_s_WindowedValueCoderImpl___reduce;
static PyObject *__pyx_n_s_WindowedValueCoderImpl___setstat;
static PyObject *__pyx_n_s_WindowedValueCoderImpl_decode_fr;
static PyObject *__pyx_n_s_WindowedValueCoderImpl_encode_to;
static PyObject *__pyx_n_s_WindowedValueCoderImpl_get_estim;
static PyObject *__pyx_kp_u__12;
static PyObject *__pyx_kp_u__13;
static PyObject *__pyx_kp_u__2;
static PyObject *__pyx_kp_u__3;
static PyObject *__pyx_kp_b__4;
static PyObject *__pyx_kp_b__5;
static PyObject *__pyx_n_s__7;
static PyObject *__pyx_kp_b__7;
static PyObject *__pyx_n_s_allocate_buffer;
static PyObject *__pyx_n_s_any;
static PyObject *__pyx_n_s_apache_beam_coders;
static PyObject *__pyx_n_s_apache_beam_coders_avro_record;
static PyObject *__pyx_n_s_apache_beam_coders_coder_impl;
static PyObject *__pyx_kp_s_apache_beam_coders_coder_impl_py;
static PyObject *__pyx_n_s_apache_beam_coders_coders;
static PyObject *__pyx_n_s_apache_beam_transforms;
static PyObject *__pyx_n_s_apache_beam_transforms_window;
static PyObject *__pyx_n_s_apache_beam_typehints_schemas;
static PyObject *__pyx_n_s_apache_beam_utils;
static PyObject *__pyx_n_s_apache_beam_utils_sharded_key;
static PyObject *__pyx_n_s_apache_beam_utils_timestamp;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_argsort;
static PyObject *__pyx_n_s_as_tuple;
static PyObject *__pyx_n_s_astype;
static PyObject *__pyx_n_s_atomic_type;
static PyObject *__pyx_n_s_axis;
static PyObject *__pyx_n_s_base;
static PyObject *__pyx_n_s_base_2;
static PyObject *__pyx_n_u_big;
static PyObject *__pyx_n_s_bit_length;
static PyObject *__pyx_n_s_boolean_coder_impl;
static PyObject *__pyx_n_s_bs;
static PyObject *__pyx_n_s_buf;
static PyObject *__pyx_n_s_byteorder;
static PyObject *__pyx_n_s_bytes;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_u_c;
static PyObject *__pyx_n_s_chr;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_clear_bit;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_coder_impl;
static PyObject *__pyx_n_s_coder_impl_row_encoders;
static PyObject *__pyx_n_s_coder_impls;
static PyObject *__pyx_n_s_column;
static PyObject *__pyx_n_s_columns;
static PyObject *__pyx_n_s_components;
static PyObject *__pyx_n_s_construct_from_components;
static PyObject *__pyx_n_s_construct_from_sequence;
static PyObject *__pyx_n_s_contents;
static PyObject *__pyx_kp_s_contiguous_and_direct;
static PyObject *__pyx_kp_s_contiguous_and_indirect;
static PyObject *__pyx_n_s_create;
static PyObject *__pyx_n_s_create_InputStream;
static PyObject *__pyx_n_u_create_InputStream;
static PyObject *__pyx_n_s_create_OutputStream;
static PyObject *__pyx_n_u_create_OutputStream;
static PyObject *__pyx_n_s_dataclass_params;
static PyObject *__pyx_n_s_dataclasses;
static PyObject *__pyx_n_s_decimal;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_decode_all;
static PyObject *__pyx_n_s_decode_batch_from_stream;
static PyObject *__pyx_n_s_decode_from_stream;
static PyObject *__pyx_n_s_decode_nested;
static PyObject *__pyx_n_s_decoder;
static PyObject *__pyx_kp_u_decoder_2;
static PyObject *__pyx_n_s_default_size_estimator;
static PyObject *__pyx_n_s_deserialize;
static PyObject *__pyx_n_s_dest;
static PyObject *__pyx_n_s_deterministic;
static PyObject *__pyx_n_s_deterministic_encoding_error_ms;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_n_s_dict_value;
static PyObject *__pyx_n_s_dill;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_dtype_is_object;
static PyObject *__pyx_n_s_dumps;
static PyObject *__pyx_n_s_dynamic_timer_tag;
static PyObject *__pyx_n_s_elem;
static PyObject *__pyx_n_s_elem_coder;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_encode_all;
static PyObject *__pyx_n_s_encode_batch_to_stream;
static PyObject *__pyx_n_s_encode_nested;
static PyObject *__pyx_n_s_encode_to_stream;
static PyObject *__pyx_n_s_encoded;
static PyObject *__pyx_n_s_encoder;
static PyObject *__pyx_n_s_encoding_position;
static PyObject *__pyx_n_s_encoding_positions_set;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_eq;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_s_estimate_size;
static PyObject *__pyx_n_s_estimated_size;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_exponent;
static PyObject *__pyx_n_s_extract_components;
static PyObject *__pyx_n_s_fallback_coder_impl;
static PyObject *__pyx_n_s_fastavro;
static PyObject *__pyx_n_s_field_type;
static PyObject *__pyx_n_s_fields;
static PyObject *__pyx_n_u_fields_2;
static PyObject *__pyx_n_s_fillvalue;
static PyObject *__pyx_n_s_finalize_write;
static PyObject *__pyx_n_s_fire_timestamp;
static PyObject *__pyx_n_s_fits_in_64_bits;
static PyObject *__pyx_n_s_flags;
static PyObject *__pyx_kp_u_for_the_input_of;
static PyObject *__pyx_kp_u_for_the_input_of_2;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fortran;
static PyObject *__pyx_n_u_fortran;
static PyObject *__pyx_n_s_from_bytes;
static PyObject *__pyx_n_s_from_proto;
static PyObject *__pyx_n_s_frozen;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getLogger;
static PyObject *__pyx_n_s_get_count;
static PyObject *__pyx_n_s_get_estimated_size_and_observabl;
static PyObject *__pyx_n_s_get_impl;
static PyObject *__pyx_n_s_get_nested_size;
static PyObject *__pyx_n_s_get_varint_size;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_u_getstate;
static PyObject *__pyx_n_s_getvalue;
static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
static PyObject *__pyx_kp_u_has_encoding_positions_set_True;
static PyObject *__pyx_n_s_hash;
static PyObject *__pyx_n_s_head;
static PyObject *__pyx_n_s_head_2;
static PyObject *__pyx_n_s_hold_timestamp;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_in;
static PyObject *__pyx_n_s_in_stream;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_init___locals_genexpr;
static PyObject *__pyx_n_s_inner_size;
static PyObject *__pyx_n_s_input_stream;
static PyObject *__pyx_n_u_int;
static PyObject *__pyx_n_s_io;
static PyObject *__pyx_n_s_is_compiled;
static PyObject *__pyx_n_s_is_dataclass;
static PyObject *__pyx_n_s_is_deterministic;
static PyObject *__pyx_n_s_is_first;
static PyObject *__pyx_n_s_is_last;
static PyObject *__pyx_n_s_islice;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_itemsize;
static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
static PyObject *__pyx_n_s_iter;
static PyObject *__pyx_n_s_iterable_coder_uses_abstract_it;
static PyObject *__pyx_n_s_itertools;
static PyObject *__pyx_n_s_json;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_key_coder;
static PyObject *__pyx_n_s_key_coder_impl;
static PyObject *__pyx_n_s_key_coder_impl_2;
static PyObject *__pyx_n_s_lambda;
static PyObject *__pyx_kp_u_latin_1;
static PyObject *__pyx_n_u_len;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_loads;
static PyObject *__pyx_n_s_logging;
static PyObject *__pyx_n_s_logical_type;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_max_timestamp;
static PyObject *__pyx_n_s_memview;
static PyObject *__pyx_n_s_message_types;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_micros;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_named_tuple_from_schema;
static PyObject *__pyx_n_s_ndarray;
static PyObject *__pyx_n_s_ndim;
static PyObject *__pyx_n_s_nested;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_nonspeculative_index;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_null_flags;
static PyObject *__pyx_n_s_null_indicator;
static PyObject *__pyx_n_s_nullable;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_observable;
static PyObject *__pyx_kp_u_of_type;
static PyObject *__pyx_n_s_other;
static PyObject *__pyx_n_s_out;
static PyObject *__pyx_n_s_pack;
static PyObject *__pyx_n_s_pane_info;
static PyObject *__pyx_n_s_pane_info_coder_impl;
static PyObject *__pyx_n_s_paneinfo;
static PyObject *__pyx_n_s_parse_schema;
static PyObject *__pyx_n_s_parsed_schema;
static PyObject *__pyx_n_s_past_unicode;
static PyObject *__pyx_n_s_payload;
static PyObject *__pyx_n_s_pb;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_kp_u_please_provide_a_type_hint_for;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_proto;
static PyObject *__pyx_n_s_proto_message;
static PyObject *__pyx_n_s_proto_message_type;
static PyObject *__pyx_n_s_proto_plus_type;
static PyObject *__pyx_n_s_proto_utils;
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_getbuffer;
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_AbstractComponent;
static PyObject *__pyx_n_s_pyx_unpickle_BigEndianShortCod;
static PyObject *__pyx_n_s_pyx_unpickle_BigIntegerCoderIm;
static PyObject *__pyx_n_s_pyx_unpickle_BooleanCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_BytesCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_CallbackCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_CoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_DecimalCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_Enum;
static PyObject *__pyx_n_s_pyx_unpickle_FastPrimitivesCod;
static PyObject *__pyx_n_s_pyx_unpickle_FloatCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_GenericRowColumnE;
static PyObject *__pyx_n_s_pyx_unpickle_IntervalWindowCod;
static PyObject *__pyx_n_s_pyx_unpickle_IterableCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_LengthPrefixCoder;
static PyObject *__pyx_n_s_pyx_unpickle_ListCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_LogicalTypeCoderI;
static PyObject *__pyx_n_s_pyx_unpickle_MapCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_PaneInfoCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_ParamWindowedValu;
static PyObject *__pyx_n_s_pyx_unpickle_RowCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_RowColumnEncoder;
static PyObject *__pyx_n_s_pyx_unpickle_SequenceCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_SimpleCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_SinglePrecisionFl;
static PyObject *__pyx_n_s_pyx_unpickle_SingletonCoderImp;
static PyObject *__pyx_n_s_pyx_unpickle_StreamCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_TimestampCoderImp;
static PyObject *__pyx_n_s_pyx_unpickle_TupleCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_TupleSequenceCode;
static PyObject *__pyx_n_s_pyx_unpickle_VarIntCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_WindowedValueCode;
static PyObject *__pyx_n_s_pyx_unpickle__AbstractIterable;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_read_byte;
static PyObject *__pyx_n_s_read_state;
static PyObject *__pyx_n_s_record;
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_register;
static PyObject *__pyx_n_s_register_iterable_like_type;
static PyObject *__pyx_n_s_representation_coder;
static PyObject *__pyx_n_s_requires_deterministic_step_labe;
static PyObject *__pyx_n_s_return;
static PyObject *__pyx_n_s_row_coders_registered;
static PyObject *__pyx_n_s_row_column_encoders;
static PyObject *__pyx_n_s_scaleb;
static PyObject *__pyx_n_s_schema;
static PyObject *__pyx_n_s_schemaless_reader;
static PyObject *__pyx_n_s_schemaless_writer;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_u_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_shape;
static PyObject *__pyx_n_s_shard_id;
static PyObject *__pyx_n_s_shard_id_2;
static PyObject *__pyx_n_s_shard_id_coder_impl;
static PyObject *__pyx_n_s_signed;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_size_estimator;
static PyObject *__pyx_n_s_slow_stream;
static PyObject *__pyx_n_s_small_ints;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_step;
static PyObject *__pyx_n_s_stop;
static PyObject *__pyx_n_s_stream;
static PyObject *__pyx_kp_s_strided_and_direct;
static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
static PyObject *__pyx_kp_s_strided_and_indirect;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_sum;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_tag_coder_impl;
static PyObject *__pyx_n_s_tail;
static PyObject *__pyx_n_s_tail_2;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_timestamp;
static PyObject *__pyx_n_s_timestamp_coder;
static PyObject *__pyx_n_s_timestamp_coder_impl;
static PyObject *__pyx_n_s_timestamp_micros;
static PyObject *__pyx_n_s_timing;
static PyObject *__pyx_n_s_to_bytes;
static PyObject *__pyx_n_s_to_language_type;
static PyObject *__pyx_n_s_to_representation_type;
static PyObject *__pyx_n_s_typ;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_typing;
static PyObject *__pyx_n_s_uint8;
static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
static PyObject *__pyx_n_s_unpack;
static PyObject *__pyx_n_s_unpickle_named_tuple;
static PyObject *__pyx_n_s_unpickle_type;
static PyObject *__pyx_n_s_unpickle_type_locals_lambda;
static PyObject *__pyx_n_s_unpickled_types;
static PyObject *__pyx_n_s_unused_value;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_use_abstract_iterable;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_n_s_user_key;
static PyObject *__pyx_n_s_userstate;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_coder;
static PyObject *__pyx_n_s_value_coder_2;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_warning;
static PyObject *__pyx_n_s_window_coder;
static PyObject *__pyx_n_s_window_coder_impl;
static PyObject *__pyx_n_s_window_coder_impl_2;
static PyObject *__pyx_n_s_windowed_value;
static PyObject *__pyx_n_s_windowed_value_coder;
static PyObject *__pyx_n_s_windows;
static PyObject *__pyx_n_s_windows_coder_impl;
static PyObject *__pyx_n_s_write_byte;
static PyObject *__pyx_n_s_write_state;
static PyObject *__pyx_n_s_write_state_threshold;
static PyObject *__pyx_n_s_wv;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_zeros;
static PyObject *__pyx_n_s_zip_longest;
static PyObject *__pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_typ, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_8encode_all(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_10decode_all(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_13encode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_15decode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_19_get_nested_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, int __pyx_v_inner_size, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_23__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_25__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_2decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoder, PyObject *__pyx_v_decoder, PyObject *__pyx_v_size_estimator); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_2_default_size_estimator(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_8encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_10decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_12estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_14get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_16__repr__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_18__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_20__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proto_message_type); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proto_plus_type); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_fallback_coder_impl, PyObject *__pyx_v_requires_deterministic_step_label); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_2register_iterable_like_type(PyObject *__pyx_v_t); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_4get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_6encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_8_deterministic_encoding_error_msg(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_10decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl__unpickle_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_2_unpickle_named_tuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs, PyObject *__pyx_v_items); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_key_coder, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_is_deterministic); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_dict_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_6estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value_coder); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unused_value, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_coder_impl, PyObject *__pyx_v_window_coder_impl); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_6encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_8decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_coder_impls); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_2_extract_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_4_construct_from_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_6encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_8decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_14__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_16__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_2_construct_from_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_head, PyObject *__pyx_v_tail); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_5__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_7__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_9__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_elem_coder, PyObject *__pyx_v_read_state, PyObject *__pyx_v_write_state, PyObject *__pyx_v_write_state_threshold); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_2_construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self, PyObject *__pyx_v_contents); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_2__iter__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_4__repr__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_6__eq__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_left, PyObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_use_abstract_iterable, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_2_construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v_components); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_timestamp_coder, PyObject *__pyx_v_window_coder); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_window_coder, PyObject *__pyx_v_payload); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_2_from_proto(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_payload, PyObject *__pyx_v_window_coder); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_6estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_coder_impl); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_window_coder_impl); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_stream, PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_register(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_field_type, PyObject *__pyx_v_coder_impl); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_2create(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_field_type, PyObject *__pyx_v_coder_impl, PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_4null_flags(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_6finalize_write(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v_coder_impl, PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_2null_flags(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_4finalize_write(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___6genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___9genexpr(PyObject *__pyx_self); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_components); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_4_row_column_encoders(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_6encode_batch_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_10decode_batch_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_dest, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_logical_type, PyObject *__pyx_v_representation_coder); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_6__pyx_unpickle_CoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_8__pyx_unpickle_SimpleCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_10__pyx_unpickle_StreamCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12__pyx_unpickle_CallbackCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14__pyx_unpickle_FastPrimitivesCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16__pyx_unpickle_BytesCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18__pyx_unpickle_BooleanCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20__pyx_unpickle_MapCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22__pyx_unpickle_BigEndianShortCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_24__pyx_unpickle_SinglePrecisionFloatCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26__pyx_unpickle_FloatCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_28__pyx_unpickle_IntervalWindowCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_30__pyx_unpickle_TimestampCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_32__pyx_unpickle_VarIntCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_34__pyx_unpickle_SingletonCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36__pyx_unpickle_AbstractComponentCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_38__pyx_unpickle_TupleCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_40__pyx_unpickle_SequenceCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_42__pyx_unpickle_TupleSequenceCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_44__pyx_unpickle__AbstractIterable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_46__pyx_unpickle_IterableCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_48__pyx_unpickle_ListCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_50__pyx_unpickle_PaneInfoCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_52__pyx_unpickle_WindowedValueCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_54__pyx_unpickle_ParamWindowedValueCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_56__pyx_unpickle_LengthPrefixCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_58__pyx_unpickle_RowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_60__pyx_unpickle_GenericRowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_62__pyx_unpickle_RowCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_64__pyx_unpickle_LogicalTypeCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_66__pyx_unpickle_BigIntegerCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_68__pyx_unpickle_DecimalCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SimpleCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BytesCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BooleanCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_FloatCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_VarIntCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl__AbstractIterable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_IterableCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_ListCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_DecimalCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, &__pyx_n_s_values, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_103;
static PyObject *__pyx_int_104;
static PyObject *__pyx_int_1000;
static PyObject *__pyx_int_12345;
static PyObject *__pyx_int_65536;
static PyObject *__pyx_int_772173;
static PyObject *__pyx_int_4374576;
static PyObject *__pyx_int_5753188;
static PyObject *__pyx_int_10585166;
static PyObject *__pyx_int_12649985;
static PyObject *__pyx_int_16430586;
static PyObject *__pyx_int_17783873;
static PyObject *__pyx_int_18374862;
static PyObject *__pyx_int_25546916;
static PyObject *__pyx_int_36447268;
static PyObject *__pyx_int_38623158;
static PyObject *__pyx_int_48664042;
static PyObject *__pyx_int_51847764;
static PyObject *__pyx_int_63293558;
static PyObject *__pyx_int_88144501;
static PyObject *__pyx_int_90923958;
static PyObject *__pyx_int_91790965;
static PyObject *__pyx_int_102880368;
static PyObject *__pyx_int_107408500;
static PyObject *__pyx_int_109055100;
static PyObject *__pyx_int_112010984;
static PyObject *__pyx_int_112105877;
static PyObject *__pyx_int_113116285;
static PyObject *__pyx_int_120365723;
static PyObject *__pyx_int_125584289;
static PyObject *__pyx_int_133669511;
static PyObject *__pyx_int_134056825;
static PyObject *__pyx_int_136983863;
static PyObject *__pyx_int_140638058;
static PyObject *__pyx_int_140927196;
static PyObject *__pyx_int_142505101;
static PyObject *__pyx_int_157115109;
static PyObject *__pyx_int_172633095;
static PyObject *__pyx_int_173814568;
static PyObject *__pyx_int_184977713;
static PyObject *__pyx_int_190324669;
static PyObject *__pyx_int_192480703;
static PyObject *__pyx_int_196964917;
static PyObject *__pyx_int_206513719;
static PyObject *__pyx_int_213871712;
static PyObject *__pyx_int_222419149;
static PyObject *__pyx_int_226081823;
static PyObject *__pyx_int_228825662;
static PyObject *__pyx_int_235957399;
static PyObject *__pyx_int_238750788;
static PyObject *__pyx_int_239948688;
static PyObject *__pyx_int_254493075;
static PyObject *__pyx_int_254493288;
static PyObject *__pyx_int_256189473;
static PyObject *__pyx_int_260527683;
static PyObject *__pyx_int_264067927;
static PyObject *__pyx_int_9223372036854775807;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_neg_9223372036854775808;
static PyObject *__pyx_codeobj_;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_slice__14;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__144;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__150;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_tuple__156;
static PyObject *__pyx_tuple__158;
static PyObject *__pyx_tuple__160;
static PyObject *__pyx_tuple__162;
static PyObject *__pyx_tuple__164;
static PyObject *__pyx_tuple__166;
static PyObject *__pyx_tuple__168;
static PyObject *__pyx_tuple__170;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__184;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__191;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__227;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__247;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__251;
static PyObject *__pyx_tuple__253;
static PyObject *__pyx_tuple__255;
static PyObject *__pyx_tuple__257;
static PyObject *__pyx_tuple__259;
static PyObject *__pyx_tuple__261;
static PyObject *__pyx_tuple__263;
static PyObject *__pyx_tuple__265;
static PyObject *__pyx_tuple__267;
static PyObject *__pyx_tuple__269;
static PyObject *__pyx_tuple__271;
static PyObject *__pyx_tuple__273;
static PyObject *__pyx_tuple__275;
static PyObject *__pyx_tuple__277;
static PyObject *__pyx_tuple__279;
static PyObject *__pyx_tuple__281;
static PyObject *__pyx_tuple__283;
static PyObject *__pyx_tuple__285;
static PyObject *__pyx_tuple__287;
static PyObject *__pyx_tuple__289;
static PyObject *__pyx_tuple__291;
static PyObject *__pyx_tuple__293;
static PyObject *__pyx_tuple__295;
static PyObject *__pyx_tuple__297;
static PyObject *__pyx_tuple__299;
static PyObject *__pyx_tuple__301;
static PyObject *__pyx_tuple__302;
static PyObject *__pyx_tuple__304;
static PyObject *__pyx_tuple__305;
static PyObject *__pyx_tuple__307;
static PyObject *__pyx_tuple__309;
static PyObject *__pyx_tuple__311;
static PyObject *__pyx_tuple__313;
static PyObject *__pyx_tuple__315;
static PyObject *__pyx_tuple__317;
static PyObject *__pyx_tuple__319;
static PyObject *__pyx_tuple__321;
static PyObject *__pyx_tuple__323;
static PyObject *__pyx_tuple__325;
static PyObject *__pyx_tuple__327;
static PyObject *__pyx_tuple__329;
static PyObject *__pyx_tuple__331;
static PyObject *__pyx_tuple__333;
static PyObject *__pyx_tuple__335;
static PyObject *__pyx_tuple__337;
static PyObject *__pyx_tuple__339;
static PyObject *__pyx_tuple__341;
static PyObject *__pyx_tuple__343;
static PyObject *__pyx_tuple__345;
static PyObject *__pyx_tuple__347;
static PyObject *__pyx_tuple__348;
static PyObject *__pyx_tuple__350;
static PyObject *__pyx_tuple__352;
static PyObject *__pyx_tuple__354;
static PyObject *__pyx_tuple__356;
static PyObject *__pyx_tuple__358;
static PyObject *__pyx_tuple__360;
static PyObject *__pyx_tuple__362;
static PyObject *__pyx_tuple__364;
static PyObject *__pyx_tuple__366;
static PyObject *__pyx_tuple__368;
static PyObject *__pyx_tuple__370;
static PyObject *__pyx_tuple__372;
static PyObject *__pyx_tuple__374;
static PyObject *__pyx_tuple__376;
static PyObject *__pyx_tuple__378;
static PyObject *__pyx_tuple__380;
static PyObject *__pyx_tuple__382;
static PyObject *__pyx_tuple__384;
static PyObject *__pyx_tuple__386;
static PyObject *__pyx_tuple__388;
static PyObject *__pyx_tuple__390;
static PyObject *__pyx_tuple__392;
static PyObject *__pyx_tuple__394;
static PyObject *__pyx_tuple__396;
static PyObject *__pyx_tuple__398;
static PyObject *__pyx_tuple__399;
static PyObject *__pyx_tuple__401;
static PyObject *__pyx_tuple__403;
static PyObject *__pyx_tuple__405;
static PyObject *__pyx_tuple__407;
static PyObject *__pyx_tuple__408;
static PyObject *__pyx_tuple__410;
static PyObject *__pyx_tuple__412;
static PyObject *__pyx_tuple__414;
static PyObject *__pyx_tuple__416;
static PyObject *__pyx_tuple__418;
static PyObject *__pyx_tuple__420;
static PyObject *__pyx_tuple__422;
static PyObject *__pyx_tuple__424;
static PyObject *__pyx_tuple__426;
static PyObject *__pyx_tuple__428;
static PyObject *__pyx_tuple__430;
static PyObject *__pyx_tuple__432;
static PyObject *__pyx_tuple__434;
static PyObject *__pyx_tuple__436;
static PyObject *__pyx_tuple__438;
static PyObject *__pyx_tuple__440;
static PyObject *__pyx_tuple__442;
static PyObject *__pyx_tuple__444;
static PyObject *__pyx_tuple__446;
static PyObject *__pyx_tuple__448;
static PyObject *__pyx_tuple__450;
static PyObject *__pyx_tuple__452;
static PyObject *__pyx_tuple__454;
static PyObject *__pyx_tuple__456;
static PyObject *__pyx_tuple__458;
static PyObject *__pyx_tuple__460;
static PyObject *__pyx_tuple__462;
static PyObject *__pyx_tuple__464;
static PyObject *__pyx_tuple__466;
static PyObject *__pyx_tuple__468;
static PyObject *__pyx_tuple__470;
static PyObject *__pyx_tuple__472;
static PyObject *__pyx_tuple__474;
static PyObject *__pyx_tuple__476;
static PyObject *__pyx_tuple__478;
static PyObject *__pyx_tuple__480;
static PyObject *__pyx_tuple__482;
static PyObject *__pyx_tuple__484;
static PyObject *__pyx_tuple__486;
static PyObject *__pyx_tuple__488;
static PyObject *__pyx_tuple__490;
static PyObject *__pyx_tuple__492;
static PyObject *__pyx_tuple__494;
static PyObject *__pyx_tuple__496;
static PyObject *__pyx_tuple__498;
static PyObject *__pyx_tuple__500;
static PyObject *__pyx_tuple__502;
static PyObject *__pyx_tuple__504;
static PyObject *__pyx_tuple__506;
static PyObject *__pyx_tuple__508;
static PyObject *__pyx_tuple__510;
static PyObject *__pyx_tuple__512;
static PyObject *__pyx_tuple__514;
static PyObject *__pyx_tuple__516;
static PyObject *__pyx_tuple__518;
static PyObject *__pyx_tuple__520;
static PyObject *__pyx_tuple__522;
static PyObject *__pyx_tuple__524;
static PyObject *__pyx_tuple__526;
static PyObject *__pyx_tuple__528;
static PyObject *__pyx_tuple__530;
static PyObject *__pyx_tuple__531;
static PyObject *__pyx_tuple__532;
static PyObject *__pyx_tuple__533;
static PyObject *__pyx_tuple__534;
static PyObject *__pyx_tuple__535;
static PyObject *__pyx_codeobj__10;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__54;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__63;
static PyObject *__pyx_codeobj__65;
static PyObject *__pyx_codeobj__67;
static PyObject *__pyx_codeobj__69;
static PyObject *__pyx_codeobj__71;
static PyObject *__pyx_codeobj__73;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__95;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__99;
static PyObject *__pyx_codeobj__101;
static PyObject *__pyx_codeobj__103;
static PyObject *__pyx_codeobj__105;
static PyObject *__pyx_codeobj__107;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__111;
static PyObject *__pyx_codeobj__113;
static PyObject *__pyx_codeobj__115;
static PyObject *__pyx_codeobj__117;
static PyObject *__pyx_codeobj__119;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__141;
static PyObject *__pyx_codeobj__143;
static PyObject *__pyx_codeobj__145;
static PyObject *__pyx_codeobj__147;
static PyObject *__pyx_codeobj__149;
static PyObject *__pyx_codeobj__151;
static PyObject *__pyx_codeobj__153;
static PyObject *__pyx_codeobj__155;
static PyObject *__pyx_codeobj__157;
static PyObject *__pyx_codeobj__159;
static PyObject *__pyx_codeobj__161;
static PyObject *__pyx_codeobj__163;
static PyObject *__pyx_codeobj__165;
static PyObject *__pyx_codeobj__167;
static PyObject *__pyx_codeobj__169;
static PyObject *__pyx_codeobj__171;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__175;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__218;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__228;
static PyObject *__pyx_codeobj__230;
static PyObject *__pyx_codeobj__232;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__238;
static PyObject *__pyx_codeobj__240;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__244;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__248;
static PyObject *__pyx_codeobj__250;
static PyObject *__pyx_codeobj__252;
static PyObject *__pyx_codeobj__254;
static PyObject *__pyx_codeobj__256;
static PyObject *__pyx_codeobj__258;
static PyObject *__pyx_codeobj__260;
static PyObject *__pyx_codeobj__262;
static PyObject *__pyx_codeobj__264;
static PyObject *__pyx_codeobj__266;
static PyObject *__pyx_codeobj__268;
static PyObject *__pyx_codeobj__270;
static PyObject *__pyx_codeobj__272;
static PyObject *__pyx_codeobj__274;
static PyObject *__pyx_codeobj__276;
static PyObject *__pyx_codeobj__278;
static PyObject *__pyx_codeobj__280;
static PyObject *__pyx_codeobj__282;
static PyObject *__pyx_codeobj__284;
static PyObject *__pyx_codeobj__286;
static PyObject *__pyx_codeobj__288;
static PyObject *__pyx_codeobj__290;
static PyObject *__pyx_codeobj__292;
static PyObject *__pyx_codeobj__294;
static PyObject *__pyx_codeobj__296;
static PyObject *__pyx_codeobj__298;
static PyObject *__pyx_codeobj__300;
static PyObject *__pyx_codeobj__303;
static PyObject *__pyx_codeobj__306;
static PyObject *__pyx_codeobj__308;
static PyObject *__pyx_codeobj__310;
static PyObject *__pyx_codeobj__312;
static PyObject *__pyx_codeobj__314;
static PyObject *__pyx_codeobj__316;
static PyObject *__pyx_codeobj__318;
static PyObject *__pyx_codeobj__320;
static PyObject *__pyx_codeobj__322;
static PyObject *__pyx_codeobj__324;
static PyObject *__pyx_codeobj__326;
static PyObject *__pyx_codeobj__328;
static PyObject *__pyx_codeobj__330;
static PyObject *__pyx_codeobj__332;
static PyObject *__pyx_codeobj__334;
static PyObject *__pyx_codeobj__336;
static PyObject *__pyx_codeobj__338;
static PyObject *__pyx_codeobj__340;
static PyObject *__pyx_codeobj__342;
static PyObject *__pyx_codeobj__344;
static PyObject *__pyx_codeobj__346;
static PyObject *__pyx_codeobj__349;
static PyObject *__pyx_codeobj__351;
static PyObject *__pyx_codeobj__353;
static PyObject *__pyx_codeobj__355;
static PyObject *__pyx_codeobj__357;
static PyObject *__pyx_codeobj__359;
static PyObject *__pyx_codeobj__361;
static PyObject *__pyx_codeobj__363;
static PyObject *__pyx_codeobj__365;
static PyObject *__pyx_codeobj__367;
static PyObject *__pyx_codeobj__369;
static PyObject *__pyx_codeobj__371;
static PyObject *__pyx_codeobj__373;
static PyObject *__pyx_codeobj__375;
static PyObject *__pyx_codeobj__377;
static PyObject *__pyx_codeobj__379;
static PyObject *__pyx_codeobj__381;
static PyObject *__pyx_codeobj__383;
static PyObject *__pyx_codeobj__385;
static PyObject *__pyx_codeobj__387;
static PyObject *__pyx_codeobj__389;
static PyObject *__pyx_codeobj__391;
static PyObject *__pyx_codeobj__393;
static PyObject *__pyx_codeobj__395;
static PyObject *__pyx_codeobj__397;
static PyObject *__pyx_codeobj__400;
static PyObject *__pyx_codeobj__402;
static PyObject *__pyx_codeobj__404;
static PyObject *__pyx_codeobj__406;
static PyObject *__pyx_codeobj__409;
static PyObject *__pyx_codeobj__411;
static PyObject *__pyx_codeobj__413;
static PyObject *__pyx_codeobj__415;
static PyObject *__pyx_codeobj__417;
static PyObject *__pyx_codeobj__419;
static PyObject *__pyx_codeobj__421;
static PyObject *__pyx_codeobj__423;
static PyObject *__pyx_codeobj__425;
static PyObject *__pyx_codeobj__427;
static PyObject *__pyx_codeobj__429;
static PyObject *__pyx_codeobj__431;
static PyObject *__pyx_codeobj__433;
static PyObject *__pyx_codeobj__435;
static PyObject *__pyx_codeobj__437;
static PyObject *__pyx_codeobj__439;
static PyObject *__pyx_codeobj__441;
static PyObject *__pyx_codeobj__443;
static PyObject *__pyx_codeobj__445;
static PyObject *__pyx_codeobj__447;
static PyObject *__pyx_codeobj__449;
static PyObject *__pyx_codeobj__451;
static PyObject *__pyx_codeobj__453;
static PyObject *__pyx_codeobj__455;
static PyObject *__pyx_codeobj__457;
static PyObject *__pyx_codeobj__459;
static PyObject *__pyx_codeobj__461;
static PyObject *__pyx_codeobj__463;
static PyObject *__pyx_codeobj__465;
static PyObject *__pyx_codeobj__467;
static PyObject *__pyx_codeobj__469;
static PyObject *__pyx_codeobj__471;
static PyObject *__pyx_codeobj__473;
static PyObject *__pyx_codeobj__475;
static PyObject *__pyx_codeobj__477;
static PyObject *__pyx_codeobj__479;
static PyObject *__pyx_codeobj__481;
static PyObject *__pyx_codeobj__483;
static PyObject *__pyx_codeobj__485;
static PyObject *__pyx_codeobj__487;
static PyObject *__pyx_codeobj__489;
static PyObject *__pyx_codeobj__491;
static PyObject *__pyx_codeobj__493;
static PyObject *__pyx_codeobj__495;
static PyObject *__pyx_codeobj__497;
static PyObject *__pyx_codeobj__499;
static PyObject *__pyx_codeobj__501;
static PyObject *__pyx_codeobj__503;
static PyObject *__pyx_codeobj__505;
static PyObject *__pyx_codeobj__507;
static PyObject *__pyx_codeobj__509;
static PyObject *__pyx_codeobj__511;
static PyObject *__pyx_codeobj__513;
static PyObject *__pyx_codeobj__515;
static PyObject *__pyx_codeobj__517;
static PyObject *__pyx_codeobj__519;
static PyObject *__pyx_codeobj__521;
static PyObject *__pyx_codeobj__523;
static PyObject *__pyx_codeobj__525;
static PyObject *__pyx_codeobj__527;
static PyObject *__pyx_codeobj__529;
static PyObject *__pyx_codeobj__536;
/* Late includes */

/* "apache_beam/coders/coder_impl.py":89
 * 
 * is_compiled = False
 * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1             # <<<<<<<<<<<<<<
 * 
 * if TYPE_CHECKING or SLOW_STREAM:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_4lambda(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_4lambda = {"lambda", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_4lambda, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_4lambda(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda(__pyx_self, ((PyObject *)__pyx_v_x));

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

static PyObject *__pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_RichCompare(__pyx_int_neg_9223372036854775808, __pyx_v_x, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_x, __pyx_int_9223372036854775807, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":101
 *     is_compiled = cython.compiled
 *   except ImportError:
 *     globals()['cython'] = type('fake_cython', (), {'cast': lambda typ, x: x})             # <<<<<<<<<<<<<<
 * 
 * else:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_5lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_5lambda1 = {"lambda1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_5lambda1, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_5lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_typ = 0;
  PyObject *__pyx_v_x = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_typ,&__pyx_n_s_x,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_typ)) != 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_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, 1); __PYX_ERR(0, 101, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda1") < 0)) __PYX_ERR(0, 101, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_typ = values[0];
    __pyx_v_x = 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, 101, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda1(__pyx_self, __pyx_v_typ, __pyx_v_x);

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

static PyObject *__pyx_lambda_funcdef_11apache_beam_6coders_10coder_impl_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_typ, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_x);
  __pyx_r = __pyx_v_x;
  goto __pyx_L0;

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

/* "apache_beam/coders/coder_impl.py":130
 * class CoderImpl(object):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 130, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 130, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 130, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 130, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":134
 * 
 *     """Reads object from potentially-nested encoding in stream."""
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, stream, nested):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 134, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":130
 * class CoderImpl(object):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream[] = "Reads object from potentially-nested encoding in stream.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_stream,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 130, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 130, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 130, __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_value = values[0];
    __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 130, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 130, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":136
 *     raise NotImplementedError
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __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_stream), __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, 136, __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_stream), __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, 136, __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, 136, __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_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __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, 136, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":140
 * 
 *     """Reads object from potentially-nested encoding in stream."""
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 140, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":136
 *     raise NotImplementedError
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream[] = "Reads object from potentially-nested encoding in stream.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_nested,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_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 136, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 136, __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_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 136, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 136, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":142
 *     raise NotImplementedError
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 142, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":146
 * 
 *     """Encodes an object to an unnested string."""
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 146, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":142
 *     raise NotImplementedError
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode[] = "Encodes an object to an unnested string.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode = {"encode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode, METH_O, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":148
 *     raise NotImplementedError
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":152
 * 
 *     """Decodes an object to an unnested string."""
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def encode_all(self, values):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 152, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":148
 *     raise NotImplementedError
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_6decode[] = "Decodes an object to an unnested string.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode = {"decode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode, METH_O, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_6decode};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 148, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_6decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((PyObject*)__pyx_v_encoded));

  /* 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_6coders_10coder_impl_9CoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":154
 *     raise NotImplementedError
 * 
 *   def encode_all(self, values):             # <<<<<<<<<<<<<<
 *     # type: (Iterable[Any]) -> bytes
 *     out = create_OutputStream()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all = {"encode_all", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_all (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_8encode_all(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_values));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_8encode_all(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_all", 0);

  /* "apache_beam/coders/coder_impl.py":156
 *   def encode_all(self, values):
 *     # type: (Iterable[Any]) -> bytes
 *     out = create_OutputStream()             # <<<<<<<<<<<<<<
 *     for value in values:
 *       self.encode_to_stream(value, out, True)
 */
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_out = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":157
 *     # type: (Iterable[Any]) -> bytes
 *     out = create_OutputStream()
 *     for value in values:             # <<<<<<<<<<<<<<
 *       self.encode_to_stream(value, out, True)
 *     return out.get()
 */
  if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
    __pyx_t_1 = __pyx_v_values; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 157, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 157, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 157, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":158
 *     out = create_OutputStream()
 *     for value in values:
 *       self.encode_to_stream(value, out, True)             # <<<<<<<<<<<<<<
 *     return out.get()
 * 
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 158, __pyx_L1_error)
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->encode_to_stream(__pyx_v_self, __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":157
 *     # type: (Iterable[Any]) -> bytes
 *     out = create_OutputStream()
 *     for value in values:             # <<<<<<<<<<<<<<
 *       self.encode_to_stream(value, out, True)
 *     return out.get()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":159
 *     for value in values:
 *       self.encode_to_stream(value, out, True)
 *     return out.get()             # <<<<<<<<<<<<<<
 * 
 *   def decode_all(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":154
 *     raise NotImplementedError
 * 
 *   def encode_all(self, values):             # <<<<<<<<<<<<<<
 *     # type: (Iterable[Any]) -> bytes
 *     out = create_OutputStream()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_9CoderImpl_12generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/coders/coder_impl.py":161
 *     return out.get()
 * 
 *   def decode_all(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Iterator[Any]
 *     input_stream = create_InputStream(encoded)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all = {"decode_all", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_all (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_10decode_all(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_encoded));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_10decode_all(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_all", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all(__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 161, __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_encoded = __pyx_v_encoded;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_encoded);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_encoded);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_9CoderImpl_12generator, __pyx_codeobj_, (PyObject *) __pyx_cur_scope, __pyx_n_s_decode_all, __pyx_n_s_CoderImpl_decode_all, __pyx_n_s_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_9CoderImpl_12generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_all", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 161, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":163
 *   def decode_all(self, encoded):
 *     # type: (bytes) -> Iterator[Any]
 *     input_stream = create_InputStream(encoded)             # <<<<<<<<<<<<<<
 *     while input_stream.size() > 0:
 *       yield self.decode_from_stream(input_stream, True)
 */
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_cur_scope->__pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_encoded);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_input_stream = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":164
 *     # type: (bytes) -> Iterator[Any]
 *     input_stream = create_InputStream(encoded)
 *     while input_stream.size() > 0:             # <<<<<<<<<<<<<<
 *       yield self.decode_from_stream(input_stream, True)
 * 
 */
  while (1) {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_stream, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_4) break;

    /* "apache_beam/coders/coder_impl.py":165
 *     input_stream = create_InputStream(encoded)
 *     while input_stream.size() > 0:
 *       yield self.decode_from_stream(input_stream, True)             # <<<<<<<<<<<<<<
 * 
 *   def encode_nested(self, value):
 */
    if (!(likely(((__pyx_cur_scope->__pyx_v_input_stream) == Py_None) || likely(__Pyx_TypeTest(__pyx_cur_scope->__pyx_v_input_stream, __pyx_ptype_11apache_beam_6coders_6stream_InputStream))))) __PYX_ERR(0, 165, __pyx_L1_error)
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->decode_from_stream(__pyx_cur_scope->__pyx_v_self, ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_cur_scope->__pyx_v_input_stream), 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 165, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "apache_beam/coders/coder_impl.py":161
 *     return out.get()
 * 
 *   def decode_all(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Iterator[Any]
 *     input_stream = create_InputStream(encoded)
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("decode_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":167
 *       yield self.decode_from_stream(input_stream, True)
 * 
 *   def encode_nested(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_nested", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_nested); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 167, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":169
 *   def encode_nested(self, value):
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()             # <<<<<<<<<<<<<<
 *     self.encode_to_stream(value, out, True)
 *     return out.get()
 */
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_out = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":170
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, True)             # <<<<<<<<<<<<<<
 *     return out.get()
 * 
 */
  if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 170, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->encode_to_stream(__pyx_v_self, __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":171
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, True)
 *     return out.get()             # <<<<<<<<<<<<<<
 * 
 *   def decode_nested(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 171, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":167
 *       yield self.decode_from_stream(input_stream, True)
 * 
 *   def encode_nested(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested = {"encode_nested", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_nested (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_13encode_nested(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_13encode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_nested", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_nested(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.encode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":173
 *     return out.get()
 * 
 *   def decode_nested(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_nested", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_nested); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":175
 *   def decode_nested(self, encoded):
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), True)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_encoded);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __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_6coders_6stream_InputStream))))) __PYX_ERR(0, 175, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->decode_from_stream(__pyx_v_self, ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_t_1), 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":173
 *     return out.get()
 * 
 *   def decode_nested(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested = {"decode_nested", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_nested (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 173, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_15decode_nested(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((PyObject*)__pyx_v_encoded));

  /* 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_6coders_10coder_impl_9CoderImpl_15decode_nested(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_nested", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_nested(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.decode_nested", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":177
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); 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)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __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, __pyx_v_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, 177, __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, __pyx_v_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, 177, __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, 177, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 177, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":181
 * 
 *     """Estimates the encoded size of the given value, in bytes."""
 *     out = ByteCountingOutputStream()             # <<<<<<<<<<<<<<
 *     self.encode_to_stream(value, out, nested)
 *     return out.get_count()
 */
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_out = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":182
 *     """Estimates the encoded size of the given value, in bytes."""
 *     out = ByteCountingOutputStream()
 *     self.encode_to_stream(value, out, nested)             # <<<<<<<<<<<<<<
 *     return out.get_count()
 * 
 */
  if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 182, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->encode_to_stream(__pyx_v_self, __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":183
 *     out = ByteCountingOutputStream()
 *     self.encode_to_stream(value, out, nested)
 *     return out.get_count()             # <<<<<<<<<<<<<<
 * 
 *   def _get_nested_size(self, inner_size, nested):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_get_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":177
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size[] = "Estimates the encoded size of the given value, in bytes.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 177, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 177, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_17estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl->estimate_size(__pyx_v_self, __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 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.coders.coder_impl.CoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":185
 *     return out.get_count()
 * 
 *   def _get_nested_size(self, inner_size, nested):             # <<<<<<<<<<<<<<
 *     if not nested:
 *       return inner_size
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl__get_nested_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, int __pyx_v_inner_size, int __pyx_v_nested, int __pyx_skip_dispatch) {
  int __pyx_v_varint_size;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_nested_size", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nested_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size)) {
        __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_inner_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
          __pyx_t_3 = 0;
          __pyx_t_4 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_7;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":186
 * 
 *   def _get_nested_size(self, inner_size, nested):
 *     if not nested:             # <<<<<<<<<<<<<<
 *       return inner_size
 *     varint_size = get_varint_size(inner_size)
 */
  __pyx_t_9 = ((!(__pyx_v_nested != 0)) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":187
 *   def _get_nested_size(self, inner_size, nested):
 *     if not nested:
 *       return inner_size             # <<<<<<<<<<<<<<
 *     varint_size = get_varint_size(inner_size)
 *     return varint_size + inner_size
 */
    __pyx_r = __pyx_v_inner_size;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":186
 * 
 *   def _get_nested_size(self, inner_size, nested):
 *     if not nested:             # <<<<<<<<<<<<<<
 *       return inner_size
 *     varint_size = get_varint_size(inner_size)
 */
  }

  /* "apache_beam/coders/coder_impl.py":188
 *     if not nested:
 *       return inner_size
 *     varint_size = get_varint_size(inner_size)             # <<<<<<<<<<<<<<
 *     return varint_size + inner_size
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_inner_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
  __pyx_t_5 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_varint_size = __pyx_t_7;

  /* "apache_beam/coders/coder_impl.py":189
 *       return inner_size
 *     varint_size = get_varint_size(inner_size)
 *     return varint_size + inner_size             # <<<<<<<<<<<<<<
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 */
  __pyx_r = (__pyx_v_varint_size + __pyx_v_inner_size);
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":185
 *     return out.get_count()
 * 
 *   def _get_nested_size(self, inner_size, nested):             # <<<<<<<<<<<<<<
 *     if not nested:
 *       return inner_size
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_WriteUnraisable("apache_beam.coders.coder_impl.CoderImpl._get_nested_size", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size = {"_get_nested_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_inner_size;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_nested_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inner_size,&__pyx_n_s_nested,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_inner_size)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get_nested_size", 1, 2, 2, 1); __PYX_ERR(0, 185, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_nested_size") < 0)) __PYX_ERR(0, 185, __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_inner_size = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_inner_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error)
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_nested_size", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 185, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl._get_nested_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_19_get_nested_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_inner_size, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_19_get_nested_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, int __pyx_v_inner_size, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_nested_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl__get_nested_size(__pyx_v_self, __pyx_v_inner_size, __pyx_v_nested, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl._get_nested_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":191
 *     return varint_size + inner_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __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, __pyx_v_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, 191, __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, __pyx_v_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, 191, __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, 191, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 191, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":209
 *       whose elements are 2-tuples of (obj, coder_impl) as described above.
 *     """
 *     return self.estimate_size(value, nested), []             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.nested = __pyx_v_nested;
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->estimate_size(__pyx_v_self, __pyx_v_value, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __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_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":191
 *     return varint_size + inner_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables[] = "Returns estimated size of value along with any nested observables.\n\n    The list of nested observables is returned as a list of 2-tuples of\n    (obj, coder_impl), where obj is an instance of observable.ObservableMixin,\n    and coder_impl is the CoderImpl that can be used to encode elements sent by\n    obj to its observers.\n\n    Arguments:\n      value: the value whose encoded size is to be estimated.\n      nested: whether the value is nested.\n\n    Returns:\n      The estimated encoded size of the given value and a list of observables\n      whose elements are 2-tuples of (obj, coder_impl) as described above.\n    ";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_estimated_size_and_observables") < 0)) __PYX_ERR(0, 191, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 191, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 191, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_21get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl->get_estimated_size_and_observables(__pyx_v_self, __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_24__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_6coders_10coder_impl_9CoderImpl_23__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_23__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_CoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_CoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_26__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_6coders_10coder_impl_9CoderImpl_25__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_25__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":216
 * 
 *   Subclass of CoderImpl implementing stream methods using encode/decode."""
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 216, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 216, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 216, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":220
 * 
 *     """Reads object from potentially-nested encoding in stream."""
 *     stream.write(self.encode(value), nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, stream, nested):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.nested = __pyx_v_nested;
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_1), 0, &__pyx_t_8); 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(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":216
 * 
 *   Subclass of CoderImpl implementing stream methods using encode/decode."""
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream[] = "Reads object from potentially-nested encoding in stream.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_stream,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 216, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 216, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 216, __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_value = values[0];
    __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 216, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 216, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":222
 *     stream.write(self.encode(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __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_stream), __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, 222, __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_stream), __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, 222, __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, 222, __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_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __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, 222, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":226
 * 
 *     """Reads object from potentially-nested encoding in stream."""
 *     return self.decode(stream.read_all(nested))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.nested = __pyx_v_nested;
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":222
 *     stream.write(self.encode(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream[] = "Reads object from potentially-nested encoding in stream.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_nested,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_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 222, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 222, __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_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 222, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 222, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 222, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_SimpleCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_SimpleCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SimpleCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":233
 * 
 *   Subclass of CoderImpl implementing encode/decode using stream methods."""
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 233, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":235
 *   def encode(self, value):
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()             # <<<<<<<<<<<<<<
 *     self.encode_to_stream(value, out, False)
 *     return out.get()
 */
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_out = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":236
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, False)             # <<<<<<<<<<<<<<
 *     return out.get()
 * 
 */
  if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 236, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":237
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, False)
 *     return out.get()             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 237, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":233
 * 
 *   Subclass of CoderImpl implementing encode/decode using stream methods."""
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode = {"encode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":239
 *     return out.get()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); 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)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":241
 *   def decode(self, encoded):
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), False)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_encoded);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __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_6coders_6stream_InputStream))))) __PYX_ERR(0, 241, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_t_1), 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":239
 *     return out.get()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode = {"decode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 239, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_2decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), ((PyObject*)__pyx_v_encoded));

  /* 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_6coders_10coder_impl_15StreamCoderImpl_2decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 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.coders.coder_impl.StreamCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":243
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __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, __pyx_v_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, 243, __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, __pyx_v_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, 243, __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, 243, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 243, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":247
 * 
 *     """Estimates the encoded size of the given value, in bytes."""
 *     out = ByteCountingOutputStream()             # <<<<<<<<<<<<<<
 *     self.encode_to_stream(value, out, nested)
 *     return out.get_count()
 */
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_out = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":248
 *     """Estimates the encoded size of the given value, in bytes."""
 *     out = ByteCountingOutputStream()
 *     self.encode_to_stream(value, out, nested)             # <<<<<<<<<<<<<<
 *     return out.get_count()
 * 
 */
  if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 248, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":249
 *     out = ByteCountingOutputStream()
 *     self.encode_to_stream(value, out, nested)
 *     return out.get_count()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_get_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":243
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size[] = "Estimates the encoded size of the given value, in bytes.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 243, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 243, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 243, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_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_6coders_10coder_impl_15StreamCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_StreamCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_StreamCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_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_6coders_10coder_impl_15StreamCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.StreamCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":260
 *   is not overwritten.
 *   """
 *   def __init__(self, encoder, decoder, size_estimator=None):             # <<<<<<<<<<<<<<
 *     self._encoder = encoder
 *     self._decoder = decoder
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_encoder = 0;
  PyObject *__pyx_v_decoder = 0;
  PyObject *__pyx_v_size_estimator = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_encoder,&__pyx_n_s_decoder,&__pyx_n_s_size_estimator,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_encoder)) != 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_decoder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 260, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_estimator);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 260, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_encoder = values[0];
    __pyx_v_decoder = values[1];
    __pyx_v_size_estimator = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 260, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_encoder, __pyx_v_decoder, __pyx_v_size_estimator);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoder, PyObject *__pyx_v_decoder, PyObject *__pyx_v_size_estimator) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":261
 *   """
 *   def __init__(self, encoder, decoder, size_estimator=None):
 *     self._encoder = encoder             # <<<<<<<<<<<<<<
 *     self._decoder = decoder
 *     self._size_estimator = size_estimator or self._default_size_estimator
 */
  __Pyx_INCREF(__pyx_v_encoder);
  __Pyx_GIVEREF(__pyx_v_encoder);
  __Pyx_GOTREF(__pyx_v_self->_encoder);
  __Pyx_DECREF(__pyx_v_self->_encoder);
  __pyx_v_self->_encoder = __pyx_v_encoder;

  /* "apache_beam/coders/coder_impl.py":262
 *   def __init__(self, encoder, decoder, size_estimator=None):
 *     self._encoder = encoder
 *     self._decoder = decoder             # <<<<<<<<<<<<<<
 *     self._size_estimator = size_estimator or self._default_size_estimator
 * 
 */
  __Pyx_INCREF(__pyx_v_decoder);
  __Pyx_GIVEREF(__pyx_v_decoder);
  __Pyx_GOTREF(__pyx_v_self->_decoder);
  __Pyx_DECREF(__pyx_v_self->_decoder);
  __pyx_v_self->_decoder = __pyx_v_decoder;

  /* "apache_beam/coders/coder_impl.py":263
 *     self._encoder = encoder
 *     self._decoder = decoder
 *     self._size_estimator = size_estimator or self._default_size_estimator             # <<<<<<<<<<<<<<
 * 
 *   def _default_size_estimator(self, value):
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_size_estimator); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 263, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_size_estimator);
    __pyx_t_1 = __pyx_v_size_estimator;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_default_size_estimator); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_size_estimator);
  __Pyx_DECREF(__pyx_v_self->_size_estimator);
  __pyx_v_self->_size_estimator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":260
 *   is not overwritten.
 *   """
 *   def __init__(self, encoder, decoder, size_estimator=None):             # <<<<<<<<<<<<<<
 *     self._encoder = encoder
 *     self._decoder = decoder
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":265
 *     self._size_estimator = size_estimator or self._default_size_estimator
 * 
 *   def _default_size_estimator(self, value):             # <<<<<<<<<<<<<<
 *     return len(self.encode(value))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator = {"_default_size_estimator", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_default_size_estimator (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_2_default_size_estimator(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_2_default_size_estimator(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_default_size_estimator", 0);

  /* "apache_beam/coders/coder_impl.py":266
 * 
 *   def _default_size_estimator(self, value):
 *     return len(self.encode(value))             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, stream, nested):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 266, __pyx_L1_error)
  }
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":265
 *     self._size_estimator = size_estimator or self._default_size_estimator
 * 
 *   def _default_size_estimator(self, value):             # <<<<<<<<<<<<<<
 *     return len(self.encode(value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl._default_size_estimator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":268
 *     return len(self.encode(value))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     return stream.write(self._encoder(value), nested)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 268, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 268, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 268, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 268, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":270
 *   def encode_to_stream(self, value, stream, nested):
 *     # type: (Any, create_OutputStream, bool) -> None
 *     return stream.write(self._encoder(value), nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, stream, nested):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_encoder);
  __pyx_t_2 = __pyx_v_self->_encoder; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 270, __pyx_L1_error)
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.nested = __pyx_v_nested;
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_1), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":268
 *     return len(self.encode(value))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     return stream.write(self._encoder(value), nested)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_stream,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 268, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 268, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 268, __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_value = values[0];
    __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 268, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 268, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 268, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_4encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":272
 *     return stream.write(self._encoder(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._decoder(stream.read_all(nested))
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __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_stream), __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, 272, __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_stream), __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, 272, __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, 272, __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_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __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, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":274
 *   def decode_from_stream(self, stream, nested):
 *     # type: (create_InputStream, bool) -> Any
 *     return self._decoder(stream.read_all(nested))             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.nested = __pyx_v_nested;
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->_decoder);
  __pyx_t_4 = __pyx_v_self->_decoder; __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":272
 *     return stream.write(self._encoder(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._decoder(stream.read_all(nested))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_nested,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_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 272, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 272, __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_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 272, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 272, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_6decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":276
 *     return self._decoder(stream.read_all(nested))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return self._encoder(value)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 276, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":277
 * 
 *   def encode(self, value):
 *     return self._encoder(value)             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_encoder);
  __pyx_t_2 = __pyx_v_self->_encoder; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 277, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":276
 *     return self._decoder(stream.read_all(nested))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return self._encoder(value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode = {"encode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_8encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_8encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":279
 *     return self._encoder(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._decoder(encoded)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":280
 * 
 *   def decode(self, encoded):
 *     return self._decoder(encoded)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_decoder);
  __pyx_t_2 = __pyx_v_self->_decoder; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_encoded);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":279
 *     return self._encoder(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._decoder(encoded)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode = {"decode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 279, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_10decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), ((PyObject*)__pyx_v_encoded));

  /* 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_6coders_10coder_impl_17CallbackCoderImpl_10decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":282
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return self._get_nested_size(self._size_estimator(value), nested)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __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, __pyx_v_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, 282, __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, __pyx_v_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, 282, __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, 282, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 282, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":284
 *   def estimate_size(self, value, nested=False):
 *     # type: (Any, bool) -> int
 *     return self._get_nested_size(self._size_estimator(value), nested)             # <<<<<<<<<<<<<<
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_size_estimator);
  __pyx_t_2 = __pyx_v_self->_size_estimator; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._get_nested_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_t_6, __pyx_v_nested, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":282
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return self._get_nested_size(self._size_estimator(value), nested)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 282, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 282, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_12estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_12estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":286
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     # TODO(robertwb): Remove this once all coders are correct.
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __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, __pyx_v_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, 286, __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, __pyx_v_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, 286, __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, 286, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 286, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":289
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     # TODO(robertwb): Remove this once all coders are correct.
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # CallbackCoderImpl can presumably encode the elements too.
 *       return 1, [(value, self)]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":291
 *     if isinstance(value, observable.ObservableMixin):
 *       # CallbackCoderImpl can presumably encode the elements too.
 *       return 1, [(value, self)]             # <<<<<<<<<<<<<<
 * 
 *     return self.estimate_size(value, nested), []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
    __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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":289
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     # TODO(robertwb): Remove this once all coders are correct.
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # CallbackCoderImpl can presumably encode the elements too.
 *       return 1, [(value, self)]
 */
  }

  /* "apache_beam/coders/coder_impl.py":293
 *       return 1, [(value, self)]
 * 
 *     return self.estimate_size(value, nested), []             # <<<<<<<<<<<<<<
 * 
 *   def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.nested = __pyx_v_nested;
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0, &__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":286
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     # TODO(robertwb): Remove this once all coders are correct.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_estimated_size_and_observables") < 0)) __PYX_ERR(0, 286, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 286, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_14get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_14get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":295
 *     return self.estimate_size(value, nested), []
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % (
 *         self._encoder, self._decoder)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_16__repr__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_16__repr__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "apache_beam/coders/coder_impl.py":296
 * 
 *   def __repr__(self):
 *     return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % (             # <<<<<<<<<<<<<<
 *         self._encoder, self._decoder)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_CallbackCoderImpl_encoder);
  __pyx_t_2 += 26;
  __Pyx_GIVEREF(__pyx_kp_u_CallbackCoderImpl_encoder);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_CallbackCoderImpl_encoder);

  /* "apache_beam/coders/coder_impl.py":297
 *   def __repr__(self):
 *     return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % (
 *         self._encoder, self._decoder)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->_encoder), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __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, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_decoder_2);
  __pyx_t_2 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_decoder_2);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_decoder_2);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->_decoder), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __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, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__2);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__2);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__2);

  /* "apache_beam/coders/coder_impl.py":296
 * 
 *   def __repr__(self):
 *     return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % (             # <<<<<<<<<<<<<<
 *         self._encoder, self._decoder)
 * 
 */
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":295
 *     return self.estimate_size(value, nested), []
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     return 'CallbackCoderImpl[encoder=%s, decoder=%s]' % (
 *         self._encoder, self._decoder)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_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_6coders_10coder_impl_17CallbackCoderImpl_18__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_18__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._decoder, self._encoder, self._size_estimator)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->_decoder);
  __Pyx_GIVEREF(__pyx_v_self->_decoder);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_decoder);
  __Pyx_INCREF(__pyx_v_self->_encoder);
  __Pyx_GIVEREF(__pyx_v_self->_encoder);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_encoder);
  __Pyx_INCREF(__pyx_v_self->_size_estimator);
  __Pyx_GIVEREF(__pyx_v_self->_size_estimator);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->_size_estimator);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._decoder, self._encoder, self._size_estimator)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._decoder, self._encoder, self._size_estimator)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._decoder, self._encoder, self._size_estimator)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->_decoder != 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->_encoder != 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->_size_estimator != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    __pyx_t_3 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None
 *     if use_setstate:
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_CallbackCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_226081823);
    __Pyx_GIVEREF(__pyx_int_226081823);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_226081823);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._decoder is not None or self._encoder is not None or self._size_estimator is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, None), state
 *     else:
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_CallbackCoderImpl); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_226081823);
    __Pyx_GIVEREF(__pyx_int_226081823);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_226081823);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_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_6coders_10coder_impl_17CallbackCoderImpl_20__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_20__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.CallbackCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":302
 * class ProtoCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_message_type):             # <<<<<<<<<<<<<<
 *     self.proto_message_type = proto_message_type
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_proto_message_type = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_proto_message_type,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_proto_message_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 302, __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, 302, __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_proto_message_type = 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, 302, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_proto_message_type);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proto_message_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":303
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_message_type):
 *     self.proto_message_type = proto_message_type             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_proto_message_type, __pyx_v_proto_message_type) < 0) __PYX_ERR(0, 303, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":302
 * class ProtoCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_message_type):             # <<<<<<<<<<<<<<
 *     self.proto_message_type = proto_message_type
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":305
 *     self.proto_message_type = proto_message_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializePartialToString()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode = {"encode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 305, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 305, __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_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 305, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_2encode(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);

  /* "apache_beam/coders/coder_impl.py":306
 * 
 *   def encode(self, value):
 *     return value.SerializePartialToString()             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":305
 *     self.proto_message_type = proto_message_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializePartialToString()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":308
 *     return value.SerializePartialToString()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)  # This is in effect "ParsePartial".
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode = {"decode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_encoded = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_encoded,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_encoded)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, 1); __PYX_ERR(0, 308, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode") < 0)) __PYX_ERR(0, 308, __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_encoded = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 308, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_4decode(__pyx_self, __pyx_v_self, __pyx_v_encoded);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_v_proto_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);

  /* "apache_beam/coders/coder_impl.py":309
 * 
 *   def decode(self, encoded):
 *     proto_message = self.proto_message_type()             # <<<<<<<<<<<<<<
 *     proto_message.ParseFromString(encoded)  # This is in effect "ParsePartial".
 *     return proto_message
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proto_message_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_proto_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":310
 *   def decode(self, encoded):
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)  # This is in effect "ParsePartial".             # <<<<<<<<<<<<<<
 *     return proto_message
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto_message, __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_encoded);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":311
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)  # This is in effect "ParsePartial".
 *     return proto_message             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_proto_message);
  __pyx_r = __pyx_v_proto_message;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":308
 *     return value.SerializePartialToString()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)  # This is in effect "ParsePartial".
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_proto_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":316
 * class DeterministicProtoCoderImpl(ProtoCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializePartialToString(deterministic=True)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode = {"encode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 316, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 316, __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_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 316, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicProtoCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_encode(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);

  /* "apache_beam/coders/coder_impl.py":317
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode(self, value):
 *     return value.SerializePartialToString(deterministic=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_deterministic, Py_True) < 0) __PYX_ERR(0, 317, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":316
 * class DeterministicProtoCoderImpl(ProtoCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializePartialToString(deterministic=True)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicProtoCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":322
 * class ProtoPlusCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_plus_type):             # <<<<<<<<<<<<<<
 *     # type: (Type[proto.Message]) -> None
 *     self.proto_plus_type = proto_plus_type
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_proto_plus_type = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_proto_plus_type,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_proto_plus_type)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 322, __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, 322, __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_proto_plus_type = 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, 322, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_proto_plus_type);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_proto_plus_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":324
 *   def __init__(self, proto_plus_type):
 *     # type: (Type[proto.Message]) -> None
 *     self.proto_plus_type = proto_plus_type             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_proto_plus_type, __pyx_v_proto_plus_type) < 0) __PYX_ERR(0, 324, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":322
 * class ProtoPlusCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_plus_type):             # <<<<<<<<<<<<<<
 *     # type: (Type[proto.Message]) -> None
 *     self.proto_plus_type = proto_plus_type
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":326
 *     self.proto_plus_type = proto_plus_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value._pb.SerializePartialToString(deterministic=True)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode = {"encode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 326, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 326, __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_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 326, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_2encode(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);

  /* "apache_beam/coders/coder_impl.py":327
 * 
 *   def encode(self, value):
 *     return value._pb.SerializePartialToString(deterministic=True)             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_pb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_deterministic, Py_True) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":326
 *     self.proto_plus_type = proto_plus_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value._pb.SerializePartialToString(deterministic=True)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":329
 *     return value._pb.SerializePartialToString(deterministic=True)
 * 
 *   def decode(self, value):             # <<<<<<<<<<<<<<
 *     return self.proto_plus_type.deserialize(value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode = {"decode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode") < 0)) __PYX_ERR(0, 329, __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_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_4decode(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);

  /* "apache_beam/coders/coder_impl.py":330
 * 
 *   def decode(self, value):
 *     return self.proto_plus_type.deserialize(value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_proto_plus_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deserialize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":329
 *     return value._pb.SerializePartialToString(deterministic=True)
 * 
 *   def decode(self, value):             # <<<<<<<<<<<<<<
 *     return self.proto_plus_type.deserialize(value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ProtoPlusCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":361
 * class FastPrimitivesCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, fallback_coder_impl, requires_deterministic_step_label=None):
 *     self.fallback_coder_impl = fallback_coder_impl
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fallback_coder_impl = 0;
  PyObject *__pyx_v_requires_deterministic_step_label = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fallback_coder_impl,&__pyx_n_s_requires_deterministic_step_labe,0};
    PyObject* values[2] = {0,0};

    /* "apache_beam/coders/coder_impl.py":362
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(
 *       self, fallback_coder_impl, requires_deterministic_step_label=None):             # <<<<<<<<<<<<<<
 *     self.fallback_coder_impl = fallback_coder_impl
 *     self.iterable_coder_impl = IterableCoderImpl(self)
 */
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fallback_coder_impl)) != 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_requires_deterministic_step_labe);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 361, __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_fallback_coder_impl = values[0];
    __pyx_v_requires_deterministic_step_label = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 361, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_fallback_coder_impl, __pyx_v_requires_deterministic_step_label);

  /* "apache_beam/coders/coder_impl.py":361
 * class FastPrimitivesCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, fallback_coder_impl, requires_deterministic_step_label=None):
 *     self.fallback_coder_impl = fallback_coder_impl
 */

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_fallback_coder_impl, PyObject *__pyx_v_requires_deterministic_step_label) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":363
 *   def __init__(
 *       self, fallback_coder_impl, requires_deterministic_step_label=None):
 *     self.fallback_coder_impl = fallback_coder_impl             # <<<<<<<<<<<<<<
 *     self.iterable_coder_impl = IterableCoderImpl(self)
 *     self.requires_deterministic_step_label = requires_deterministic_step_label
 */
  if (!(likely(((__pyx_v_fallback_coder_impl) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fallback_coder_impl, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 363, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_fallback_coder_impl;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->fallback_coder_impl);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->fallback_coder_impl));
  __pyx_v_self->fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":364
 *       self, fallback_coder_impl, requires_deterministic_step_label=None):
 *     self.fallback_coder_impl = fallback_coder_impl
 *     self.iterable_coder_impl = IterableCoderImpl(self)             # <<<<<<<<<<<<<<
 *     self.requires_deterministic_step_label = requires_deterministic_step_label
 *     self.warn_deterministic_fallback = True
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->iterable_coder_impl);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->iterable_coder_impl));
  __pyx_v_self->iterable_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":365
 *     self.fallback_coder_impl = fallback_coder_impl
 *     self.iterable_coder_impl = IterableCoderImpl(self)
 *     self.requires_deterministic_step_label = requires_deterministic_step_label             # <<<<<<<<<<<<<<
 *     self.warn_deterministic_fallback = True
 * 
 */
  __Pyx_INCREF(__pyx_v_requires_deterministic_step_label);
  __Pyx_GIVEREF(__pyx_v_requires_deterministic_step_label);
  __Pyx_GOTREF(__pyx_v_self->requires_deterministic_step_label);
  __Pyx_DECREF(__pyx_v_self->requires_deterministic_step_label);
  __pyx_v_self->requires_deterministic_step_label = __pyx_v_requires_deterministic_step_label;

  /* "apache_beam/coders/coder_impl.py":366
 *     self.iterable_coder_impl = IterableCoderImpl(self)
 *     self.requires_deterministic_step_label = requires_deterministic_step_label
 *     self.warn_deterministic_fallback = True             # <<<<<<<<<<<<<<
 * 
 *   @staticmethod
 */
  __pyx_v_self->warn_deterministic_fallback = 1;

  /* "apache_beam/coders/coder_impl.py":361
 * class FastPrimitivesCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self, fallback_coder_impl, requires_deterministic_step_label=None):
 *     self.fallback_coder_impl = fallback_coder_impl
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":369
 * 
 *   @staticmethod
 *   def register_iterable_like_type(t):             # <<<<<<<<<<<<<<
 *     _ITERABLE_LIKE_TYPES.add(t)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type = {"register_iterable_like_type", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_t = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("register_iterable_like_type (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register_iterable_like_type") < 0)) __PYX_ERR(0, 369, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_t = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("register_iterable_like_type", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 369, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.register_iterable_like_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_2register_iterable_like_type(__pyx_v_t);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_2register_iterable_like_type(PyObject *__pyx_v_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("register_iterable_like_type", 0);

  /* "apache_beam/coders/coder_impl.py":370
 *   @staticmethod
 *   def register_iterable_like_type(t):
 *     _ITERABLE_LIKE_TYPES.add(t)             # <<<<<<<<<<<<<<
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 */
  if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
    __PYX_ERR(0, 370, __pyx_L1_error)
  }
  __pyx_t_1 = PySet_Add(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES, __pyx_v_t); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 370, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":369
 * 
 *   @staticmethod
 *   def register_iterable_like_type(t):             # <<<<<<<<<<<<<<
 *     _ITERABLE_LIKE_TYPES.add(t)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.register_iterable_like_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":372
 *     _ITERABLE_LIKE_TYPES.add(t)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     if isinstance(value, observable.ObservableMixin):
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __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, __pyx_v_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, 372, __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, __pyx_v_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, 372, __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, 372, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 372, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":374
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 *       return 1, [(value, self)]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":376
 *     if isinstance(value, observable.ObservableMixin):
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 *       return 1, [(value, self)]             # <<<<<<<<<<<<<<
 * 
 *     out = ByteCountingOutputStream()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
    __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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":374
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 *       return 1, [(value, self)]
 */
  }

  /* "apache_beam/coders/coder_impl.py":378
 *       return 1, [(value, self)]
 * 
 *     out = ByteCountingOutputStream()             # <<<<<<<<<<<<<<
 *     self.encode_to_stream(value, out, nested)
 *     return out.get_count(), []
 */
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream);
  __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream; __pyx_t_4 = NULL;
  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_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_out = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":379
 * 
 *     out = ByteCountingOutputStream()
 *     self.encode_to_stream(value, out, nested)             # <<<<<<<<<<<<<<
 *     return out.get_count(), []
 * 
 */
  if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 379, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out), __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":380
 *     out = ByteCountingOutputStream()
 *     self.encode_to_stream(value, out, nested)
 *     return out.get_count(), []             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, stream, nested):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_get_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":372
 *     _ITERABLE_LIKE_TYPES.add(t)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     if isinstance(value, observable.ObservableMixin):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_estimated_size_and_observables") < 0)) __PYX_ERR(0, 372, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 372, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 372, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_4get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_4get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":382
 *     return out.get_count(), []
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     t = type(value)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_dict_value = 0;
  int64_t __pyx_v_int_value;
  PyObject *__pyx_v_unicode_value = 0;
  PyTypeObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_ordered_kvs = NULL;
  PyObject *__pyx_v_exn = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int64_t __pyx_t_13;
  int __pyx_t_14;
  double __pyx_t_15;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_16;
  unsigned char __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  PyObject *(*__pyx_t_19)(PyObject *);
  int __pyx_t_20;
  int __pyx_t_21;
  char const *__pyx_t_22;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *(*__pyx_t_29)(PyObject *);
  Py_ssize_t __pyx_t_30;
  char const *__pyx_t_31;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_INCREF(__pyx_v_value);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 382, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 382, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 382, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 382, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":384
 *   def encode_to_stream(self, value, stream, nested):
 *     # type: (Any, create_OutputStream, bool) -> None
 *     t = type(value)             # <<<<<<<<<<<<<<
 *     if value is None:
 *       stream.write_byte(NONE_TYPE)
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
  __pyx_v_t = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value)));

  /* "apache_beam/coders/coder_impl.py":385
 *     # type: (Any, create_OutputStream, bool) -> None
 *     t = type(value)
 *     if value is None:             # <<<<<<<<<<<<<<
 *       stream.write_byte(NONE_TYPE)
 *     elif t is int:
 */
  __pyx_t_8 = (__pyx_v_value == Py_None);
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":386
 *     t = type(value)
 *     if value is None:
 *       stream.write_byte(NONE_TYPE)             # <<<<<<<<<<<<<<
 *     elif t is int:
 *       # In Python 3, an int may be larger than 64 bits.
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":385
 *     # type: (Any, create_OutputStream, bool) -> None
 *     t = type(value)
 *     if value is None:             # <<<<<<<<<<<<<<
 *       stream.write_byte(NONE_TYPE)
 *     elif t is int:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":387
 *     if value is None:
 *       stream.write_byte(NONE_TYPE)
 *     elif t is int:             # <<<<<<<<<<<<<<
 *       # In Python 3, an int may be larger than 64 bits.
 *       # We need to check whether value fits into a 64 bit integer before
 */
  __pyx_t_9 = (__pyx_v_t == (&PyInt_Type));
  __pyx_t_8 = (__pyx_t_9 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":391
 *       # We need to check whether value fits into a 64 bit integer before
 *       # writing the marker byte.
 *       try:             # <<<<<<<<<<<<<<
 *         # In Cython-compiled code this will throw an overflow error
 *         # when value does not fit into int64.
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      /*try:*/ {

        /* "apache_beam/coders/coder_impl.py":394
 *         # In Cython-compiled code this will throw an overflow error
 *         # when value does not fit into int64.
 *         int_value = value             # <<<<<<<<<<<<<<
 *         # If Cython is not used, we must do a (slower) check ourselves.
 *         if not TYPE_CHECKING and not is_compiled:
 */
        __pyx_t_13 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_13 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 394, __pyx_L4_error)
        __pyx_v_int_value = __pyx_t_13;

        /* "apache_beam/coders/coder_impl.py":396
 *         int_value = value
 *         # If Cython is not used, we must do a (slower) check ourselves.
 *         if not TYPE_CHECKING and not is_compiled:             # <<<<<<<<<<<<<<
 *           if not fits_in_64_bits(value):
 *             raise OverflowError()
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_TYPE_CHECKING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 396, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_14 = ((!__pyx_t_9) != 0);
        if (__pyx_t_14) {
        } else {
          __pyx_t_8 = __pyx_t_14;
          goto __pyx_L11_bool_binop_done;
        }
        __pyx_t_14 = ((!(__pyx_v_11apache_beam_6coders_10coder_impl_is_compiled != 0)) != 0);
        __pyx_t_8 = __pyx_t_14;
        __pyx_L11_bool_binop_done:;
        if (__pyx_t_8) {

          /* "apache_beam/coders/coder_impl.py":397
 *         # If Cython is not used, we must do a (slower) check ourselves.
 *         if not TYPE_CHECKING and not is_compiled:
 *           if not fits_in_64_bits(value):             # <<<<<<<<<<<<<<
 *             raise OverflowError()
 *         stream.write_byte(INT_TYPE)
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fits_in_64_bits); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 397, __pyx_L4_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_14 = ((!__pyx_t_8) != 0);
          if (unlikely(__pyx_t_14)) {

            /* "apache_beam/coders/coder_impl.py":398
 *         if not TYPE_CHECKING and not is_compiled:
 *           if not fits_in_64_bits(value):
 *             raise OverflowError()             # <<<<<<<<<<<<<<
 *         stream.write_byte(INT_TYPE)
 *         stream.write_var_int64(int_value)
 */
            __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_OverflowError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_Raise(__pyx_t_1, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __PYX_ERR(0, 398, __pyx_L4_error)

            /* "apache_beam/coders/coder_impl.py":397
 *         # If Cython is not used, we must do a (slower) check ourselves.
 *         if not TYPE_CHECKING and not is_compiled:
 *           if not fits_in_64_bits(value):             # <<<<<<<<<<<<<<
 *             raise OverflowError()
 *         stream.write_byte(INT_TYPE)
 */
          }

          /* "apache_beam/coders/coder_impl.py":396
 *         int_value = value
 *         # If Cython is not used, we must do a (slower) check ourselves.
 *         if not TYPE_CHECKING and not is_compiled:             # <<<<<<<<<<<<<<
 *           if not fits_in_64_bits(value):
 *             raise OverflowError()
 */
        }

        /* "apache_beam/coders/coder_impl.py":399
 *           if not fits_in_64_bits(value):
 *             raise OverflowError()
 *         stream.write_byte(INT_TYPE)             # <<<<<<<<<<<<<<
 *         stream.write_var_int64(int_value)
 *       except OverflowError:
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "apache_beam/coders/coder_impl.py":400
 *             raise OverflowError()
 *         stream.write_byte(INT_TYPE)
 *         stream.write_var_int64(int_value)             # <<<<<<<<<<<<<<
 *       except OverflowError:
 *         stream.write_byte(UNKNOWN_TYPE)
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_v_int_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "apache_beam/coders/coder_impl.py":391
 *       # We need to check whether value fits into a 64 bit integer before
 *       # writing the marker byte.
 *       try:             # <<<<<<<<<<<<<<
 *         # In Cython-compiled code this will throw an overflow error
 *         # when value does not fit into int64.
 */
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":401
 *         stream.write_byte(INT_TYPE)
 *         stream.write_var_int64(int_value)
 *       except OverflowError:             # <<<<<<<<<<<<<<
 *         stream.write_byte(UNKNOWN_TYPE)
 *         self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 */
      __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_OverflowError);
      if (__pyx_t_6) {
        __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 401, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_4);

        /* "apache_beam/coders/coder_impl.py":402
 *         stream.write_var_int64(int_value)
 *       except OverflowError:
 *         stream.write_byte(UNKNOWN_TYPE)             # <<<<<<<<<<<<<<
 *         self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 *     elif t is float:
 */
        __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 402, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "apache_beam/coders/coder_impl.py":403
 *       except OverflowError:
 *         stream.write_byte(UNKNOWN_TYPE)
 *         self.fallback_coder_impl.encode_to_stream(value, stream, nested)             # <<<<<<<<<<<<<<
 *     elif t is float:
 *       stream.write_byte(FLOAT_TYPE)
 */
        __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->fallback_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->fallback_coder_impl, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "apache_beam/coders/coder_impl.py":391
 *       # We need to check whether value fits into a 64 bit integer before
 *       # writing the marker byte.
 *       try:             # <<<<<<<<<<<<<<
 *         # In Cython-compiled code this will throw an overflow error
 *         # when value does not fit into int64.
 */
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_L9_try_end:;
    }

    /* "apache_beam/coders/coder_impl.py":387
 *     if value is None:
 *       stream.write_byte(NONE_TYPE)
 *     elif t is int:             # <<<<<<<<<<<<<<
 *       # In Python 3, an int may be larger than 64 bits.
 *       # We need to check whether value fits into a 64 bit integer before
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":404
 *         stream.write_byte(UNKNOWN_TYPE)
 *         self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 *     elif t is float:             # <<<<<<<<<<<<<<
 *       stream.write_byte(FLOAT_TYPE)
 *       stream.write_bigendian_double(value)
 */
  __pyx_t_14 = (__pyx_v_t == (&PyFloat_Type));
  __pyx_t_8 = (__pyx_t_14 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":405
 *         self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 *     elif t is float:
 *       stream.write_byte(FLOAT_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write_bigendian_double(value)
 *     elif t is bytes:
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":406
 *     elif t is float:
 *       stream.write_byte(FLOAT_TYPE)
 *       stream.write_bigendian_double(value)             # <<<<<<<<<<<<<<
 *     elif t is bytes:
 *       stream.write_byte(BYTES_TYPE)
 */
    __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 406, __pyx_L1_error)
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_bigendian_double(__pyx_v_stream, __pyx_t_15, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":404
 *         stream.write_byte(UNKNOWN_TYPE)
 *         self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 *     elif t is float:             # <<<<<<<<<<<<<<
 *       stream.write_byte(FLOAT_TYPE)
 *       stream.write_bigendian_double(value)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":407
 *       stream.write_byte(FLOAT_TYPE)
 *       stream.write_bigendian_double(value)
 *     elif t is bytes:             # <<<<<<<<<<<<<<
 *       stream.write_byte(BYTES_TYPE)
 *       stream.write(value, nested)
 */
  __pyx_t_8 = (__pyx_v_t == (&PyBytes_Type));
  __pyx_t_14 = (__pyx_t_8 != 0);
  if (__pyx_t_14) {

    /* "apache_beam/coders/coder_impl.py":408
 *       stream.write_bigendian_double(value)
 *     elif t is bytes:
 *       stream.write_byte(BYTES_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write(value, nested)
 *     elif t is str:
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":409
 *     elif t is bytes:
 *       stream.write_byte(BYTES_TYPE)
 *       stream.write(value, nested)             # <<<<<<<<<<<<<<
 *     elif t is str:
 *       unicode_value = value  # for typing
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 409, __pyx_L1_error)
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.nested = __pyx_v_nested;
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_v_value), 0, &__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":407
 *       stream.write_byte(FLOAT_TYPE)
 *       stream.write_bigendian_double(value)
 *     elif t is bytes:             # <<<<<<<<<<<<<<
 *       stream.write_byte(BYTES_TYPE)
 *       stream.write(value, nested)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":410
 *       stream.write_byte(BYTES_TYPE)
 *       stream.write(value, nested)
 *     elif t is str:             # <<<<<<<<<<<<<<
 *       unicode_value = value  # for typing
 *       stream.write_byte(UNICODE_TYPE)
 */
  __pyx_t_14 = (__pyx_v_t == (&PyUnicode_Type));
  __pyx_t_8 = (__pyx_t_14 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":411
 *       stream.write(value, nested)
 *     elif t is str:
 *       unicode_value = value  # for typing             # <<<<<<<<<<<<<<
 *       stream.write_byte(UNICODE_TYPE)
 *       stream.write(unicode_value.encode('utf-8'), nested)
 */
    if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 411, __pyx_L1_error)
    __pyx_t_4 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_v_unicode_value = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":412
 *     elif t is str:
 *       unicode_value = value  # for typing
 *       stream.write_byte(UNICODE_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write(unicode_value.encode('utf-8'), nested)
 *     elif t is list or t is tuple:
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":413
 *       unicode_value = value  # for typing
 *       stream.write_byte(UNICODE_TYPE)
 *       stream.write(unicode_value.encode('utf-8'), nested)             # <<<<<<<<<<<<<<
 *     elif t is list or t is tuple:
 *       stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE)
 */
    if (unlikely(__pyx_v_unicode_value == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
      __PYX_ERR(0, 413, __pyx_L1_error)
    }
    __pyx_t_4 = PyUnicode_AsUTF8String(__pyx_v_unicode_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_16.__pyx_n = 1;
    __pyx_t_16.nested = __pyx_v_nested;
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_4), 0, &__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":410
 *       stream.write_byte(BYTES_TYPE)
 *       stream.write(value, nested)
 *     elif t is str:             # <<<<<<<<<<<<<<
 *       unicode_value = value  # for typing
 *       stream.write_byte(UNICODE_TYPE)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":414
 *       stream.write_byte(UNICODE_TYPE)
 *       stream.write(unicode_value.encode('utf-8'), nested)
 *     elif t is list or t is tuple:             # <<<<<<<<<<<<<<
 *       stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE)
 *       stream.write_var_int64(len(value))
 */
  __pyx_t_14 = (__pyx_v_t == (&PyList_Type));
  __pyx_t_9 = (__pyx_t_14 != 0);
  if (!__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_9 = (__pyx_v_t == (&PyTuple_Type));
  __pyx_t_14 = (__pyx_t_9 != 0);
  __pyx_t_8 = __pyx_t_14;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":415
 *       stream.write(unicode_value.encode('utf-8'), nested)
 *     elif t is list or t is tuple:
 *       stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write_var_int64(len(value))
 *       for e in value:
 */
    __pyx_t_8 = (__pyx_v_t == (&PyList_Type));
    if ((__pyx_t_8 != 0)) {
      __pyx_t_17 = __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE;
    } else {
      __pyx_t_17 = __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE;
    }
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_17, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":416
 *     elif t is list or t is tuple:
 *       stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE)
 *       stream.write_var_int64(len(value))             # <<<<<<<<<<<<<<
 *       for e in value:
 *         self.encode_to_stream(e, stream, True)
 */
    __pyx_t_18 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 416, __pyx_L1_error)
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_t_18, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":417
 *       stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE)
 *       stream.write_var_int64(len(value))
 *       for e in value:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(e, stream, True)
 *     elif t is bool:
 */
    if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
      __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2); __pyx_t_18 = 0;
      __pyx_t_19 = NULL;
    } else {
      __pyx_t_18 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_19 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 417, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_19)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_4); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 417, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_4); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 417, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_19(__pyx_t_2);
        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, 417, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "apache_beam/coders/coder_impl.py":418
 *       stream.write_var_int64(len(value))
 *       for e in value:
 *         self.encode_to_stream(e, stream, True)             # <<<<<<<<<<<<<<
 *     elif t is bool:
 *       stream.write_byte(BOOL_TYPE)
 */
      __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_e, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/coders/coder_impl.py":417
 *       stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE)
 *       stream.write_var_int64(len(value))
 *       for e in value:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(e, stream, True)
 *     elif t is bool:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":414
 *       stream.write_byte(UNICODE_TYPE)
 *       stream.write(unicode_value.encode('utf-8'), nested)
 *     elif t is list or t is tuple:             # <<<<<<<<<<<<<<
 *       stream.write_byte(LIST_TYPE if t is list else TUPLE_TYPE)
 *       stream.write_var_int64(len(value))
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":419
 *       for e in value:
 *         self.encode_to_stream(e, stream, True)
 *     elif t is bool:             # <<<<<<<<<<<<<<
 *       stream.write_byte(BOOL_TYPE)
 *       stream.write_byte(value)
 */
  __pyx_t_8 = (__pyx_v_t == ((PyTypeObject*)((PyObject*)&PyBool_Type)));
  __pyx_t_14 = (__pyx_t_8 != 0);
  if (__pyx_t_14) {

    /* "apache_beam/coders/coder_impl.py":420
 *         self.encode_to_stream(e, stream, True)
 *     elif t is bool:
 *       stream.write_byte(BOOL_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write_byte(value)
 *     elif t in _ITERABLE_LIKE_TYPES:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":421
 *     elif t is bool:
 *       stream.write_byte(BOOL_TYPE)
 *       stream.write_byte(value)             # <<<<<<<<<<<<<<
 *     elif t in _ITERABLE_LIKE_TYPES:
 *       stream.write_byte(ITERABLE_LIKE_TYPE)
 */
    __pyx_t_17 = __Pyx_PyInt_As_unsigned_char(__pyx_v_value); if (unlikely((__pyx_t_17 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 421, __pyx_L1_error)
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_17, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":419
 *       for e in value:
 *         self.encode_to_stream(e, stream, True)
 *     elif t is bool:             # <<<<<<<<<<<<<<
 *       stream.write_byte(BOOL_TYPE)
 *       stream.write_byte(value)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":422
 *       stream.write_byte(BOOL_TYPE)
 *       stream.write_byte(value)
 *     elif t in _ITERABLE_LIKE_TYPES:             # <<<<<<<<<<<<<<
 *       stream.write_byte(ITERABLE_LIKE_TYPE)
 *       self.iterable_coder_impl.encode_to_stream(value, stream, nested)
 */
  if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 422, __pyx_L1_error)
  }
  __pyx_t_14 = (__Pyx_PySet_ContainsTF(((PyObject *)__pyx_v_t), __pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_14 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":423
 *       stream.write_byte(value)
 *     elif t in _ITERABLE_LIKE_TYPES:
 *       stream.write_byte(ITERABLE_LIKE_TYPE)             # <<<<<<<<<<<<<<
 *       self.iterable_coder_impl.encode_to_stream(value, stream, nested)
 *     elif t is dict:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":424
 *     elif t in _ITERABLE_LIKE_TYPES:
 *       stream.write_byte(ITERABLE_LIKE_TYPE)
 *       self.iterable_coder_impl.encode_to_stream(value, stream, nested)             # <<<<<<<<<<<<<<
 *     elif t is dict:
 *       dict_value = value  # for typing
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":422
 *       stream.write_byte(BOOL_TYPE)
 *       stream.write_byte(value)
 *     elif t in _ITERABLE_LIKE_TYPES:             # <<<<<<<<<<<<<<
 *       stream.write_byte(ITERABLE_LIKE_TYPE)
 *       self.iterable_coder_impl.encode_to_stream(value, stream, nested)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":425
 *       stream.write_byte(ITERABLE_LIKE_TYPE)
 *       self.iterable_coder_impl.encode_to_stream(value, stream, nested)
 *     elif t is dict:             # <<<<<<<<<<<<<<
 *       dict_value = value  # for typing
 *       stream.write_byte(DICT_TYPE)
 */
  __pyx_t_8 = (__pyx_v_t == (&PyDict_Type));
  __pyx_t_14 = (__pyx_t_8 != 0);
  if (__pyx_t_14) {

    /* "apache_beam/coders/coder_impl.py":426
 *       self.iterable_coder_impl.encode_to_stream(value, stream, nested)
 *     elif t is dict:
 *       dict_value = value  # for typing             # <<<<<<<<<<<<<<
 *       stream.write_byte(DICT_TYPE)
 *       stream.write_var_int64(len(dict_value))
 */
    if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 426, __pyx_L1_error)
    __pyx_t_2 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v_dict_value = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":427
 *     elif t is dict:
 *       dict_value = value  # for typing
 *       stream.write_byte(DICT_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write_var_int64(len(dict_value))
 *       if self.requires_deterministic_step_label is not None:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":428
 *       dict_value = value  # for typing
 *       stream.write_byte(DICT_TYPE)
 *       stream.write_var_int64(len(dict_value))             # <<<<<<<<<<<<<<
 *       if self.requires_deterministic_step_label is not None:
 *         try:
 */
    if (unlikely(__pyx_v_dict_value == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 428, __pyx_L1_error)
    }
    __pyx_t_18 = PyDict_Size(__pyx_v_dict_value); if (unlikely(__pyx_t_18 == ((Py_ssize_t)-1))) __PYX_ERR(0, 428, __pyx_L1_error)
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_t_18, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":429
 *       stream.write_byte(DICT_TYPE)
 *       stream.write_var_int64(len(dict_value))
 *       if self.requires_deterministic_step_label is not None:             # <<<<<<<<<<<<<<
 *         try:
 *           ordered_kvs = sorted(dict_value.items())
 */
    __pyx_t_14 = (__pyx_v_self->requires_deterministic_step_label != Py_None);
    __pyx_t_8 = (__pyx_t_14 != 0);
    if (__pyx_t_8) {

      /* "apache_beam/coders/coder_impl.py":430
 *       stream.write_var_int64(len(dict_value))
 *       if self.requires_deterministic_step_label is not None:
 *         try:             # <<<<<<<<<<<<<<
 *           ordered_kvs = sorted(dict_value.items())
 *         except Exception as exn:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_10);
        /*try:*/ {

          /* "apache_beam/coders/coder_impl.py":431
 *       if self.requires_deterministic_step_label is not None:
 *         try:
 *           ordered_kvs = sorted(dict_value.items())             # <<<<<<<<<<<<<<
 *         except Exception as exn:
 *           raise TypeError(
 */
          if (unlikely(__pyx_v_dict_value == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
            __PYX_ERR(0, 431, __pyx_L21_error)
          }
          __pyx_t_4 = __Pyx_PyDict_Items(__pyx_v_dict_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_2 = ((PyObject*)__pyx_t_1);
          __pyx_t_1 = 0;
          __pyx_t_20 = PyList_Sort(__pyx_t_2); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 431, __pyx_L21_error)
          __pyx_v_ordered_kvs = ((PyObject*)__pyx_t_2);
          __pyx_t_2 = 0;

          /* "apache_beam/coders/coder_impl.py":430
 *       stream.write_var_int64(len(dict_value))
 *       if self.requires_deterministic_step_label is not None:
 *         try:             # <<<<<<<<<<<<<<
 *           ordered_kvs = sorted(dict_value.items())
 *         except Exception as exn:
 */
        }
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L26_try_end;
        __pyx_L21_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "apache_beam/coders/coder_impl.py":432
 *         try:
 *           ordered_kvs = sorted(dict_value.items())
 *         except Exception as exn:             # <<<<<<<<<<<<<<
 *           raise TypeError(
 *               "Unable to deterministically order keys of dict for '%s'" %
 */
        __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
        if (__pyx_t_6) {
          __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 432, __pyx_L23_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_1);
          __pyx_v_exn = __pyx_t_1;
          /*try:*/ {

            /* "apache_beam/coders/coder_impl.py":434
 *         except Exception as exn:
 *           raise TypeError(
 *               "Unable to deterministically order keys of dict for '%s'" %             # <<<<<<<<<<<<<<
 *               self.requires_deterministic_step_label) from exn
 *         for k, v in ordered_kvs:
 */
            __pyx_t_7 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Unable_to_deterministically_orde, __pyx_v_self->requires_deterministic_step_label); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L32_error)
            __Pyx_GOTREF(__pyx_t_7);

            /* "apache_beam/coders/coder_impl.py":433
 *           ordered_kvs = sorted(dict_value.items())
 *         except Exception as exn:
 *           raise TypeError(             # <<<<<<<<<<<<<<
 *               "Unable to deterministically order keys of dict for '%s'" %
 *               self.requires_deterministic_step_label) from exn
 */
            __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 433, __pyx_L32_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

            /* "apache_beam/coders/coder_impl.py":435
 *           raise TypeError(
 *               "Unable to deterministically order keys of dict for '%s'" %
 *               self.requires_deterministic_step_label) from exn             # <<<<<<<<<<<<<<
 *         for k, v in ordered_kvs:
 *           self.encode_to_stream(k, stream, True)
 */
            __Pyx_Raise(__pyx_t_3, 0, 0, __pyx_v_exn);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 433, __pyx_L32_error)
          }

          /* "apache_beam/coders/coder_impl.py":432
 *         try:
 *           ordered_kvs = sorted(dict_value.items())
 *         except Exception as exn:             # <<<<<<<<<<<<<<
 *           raise TypeError(
 *               "Unable to deterministically order keys of dict for '%s'" %
 */
          /*finally:*/ {
            __pyx_L32_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_26, &__pyx_t_27, &__pyx_t_28);
              if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
              __Pyx_XGOTREF(__pyx_t_23);
              __Pyx_XGOTREF(__pyx_t_24);
              __Pyx_XGOTREF(__pyx_t_25);
              __Pyx_XGOTREF(__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_27);
              __Pyx_XGOTREF(__pyx_t_28);
              __pyx_t_6 = __pyx_lineno; __pyx_t_21 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_exn);
                __pyx_v_exn = NULL;
              }
              if (PY_MAJOR_VERSION >= 3) {
                __Pyx_XGIVEREF(__pyx_t_26);
                __Pyx_XGIVEREF(__pyx_t_27);
                __Pyx_XGIVEREF(__pyx_t_28);
                __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_27, __pyx_t_28);
              }
              __Pyx_XGIVEREF(__pyx_t_23);
              __Pyx_XGIVEREF(__pyx_t_24);
              __Pyx_XGIVEREF(__pyx_t_25);
              __Pyx_ErrRestore(__pyx_t_23, __pyx_t_24, __pyx_t_25);
              __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0;
              __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_21; __pyx_filename = __pyx_t_22;
              goto __pyx_L23_except_error;
            }
          }
        }
        goto __pyx_L23_except_error;
        __pyx_L23_except_error:;

        /* "apache_beam/coders/coder_impl.py":430
 *       stream.write_var_int64(len(dict_value))
 *       if self.requires_deterministic_step_label is not None:
 *         try:             # <<<<<<<<<<<<<<
 *           ordered_kvs = sorted(dict_value.items())
 *         except Exception as exn:
 */
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
        goto __pyx_L1_error;
        __pyx_L26_try_end:;
      }

      /* "apache_beam/coders/coder_impl.py":436
 *               "Unable to deterministically order keys of dict for '%s'" %
 *               self.requires_deterministic_step_label) from exn
 *         for k, v in ordered_kvs:             # <<<<<<<<<<<<<<
 *           self.encode_to_stream(k, stream, True)
 *           self.encode_to_stream(v, stream, True)
 */
      if (unlikely(__pyx_v_ordered_kvs == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 436, __pyx_L1_error)
      }
      __pyx_t_4 = __pyx_v_ordered_kvs; __Pyx_INCREF(__pyx_t_4); __pyx_t_18 = 0;
      for (;;) {
        if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_18); __Pyx_INCREF(__pyx_t_1); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 436, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 436, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          #else
          __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_29 = Py_TYPE(__pyx_t_7)->tp_iternext;
          index = 0; __pyx_t_2 = __pyx_t_29(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L40_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_2);
          index = 1; __pyx_t_3 = __pyx_t_29(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L40_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_29(__pyx_t_7), 2) < 0) __PYX_ERR(0, 436, __pyx_L1_error)
          __pyx_t_29 = NULL;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L41_unpacking_done;
          __pyx_L40_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_29 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 436, __pyx_L1_error)
          __pyx_L41_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "apache_beam/coders/coder_impl.py":437
 *               self.requires_deterministic_step_label) from exn
 *         for k, v in ordered_kvs:
 *           self.encode_to_stream(k, stream, True)             # <<<<<<<<<<<<<<
 *           self.encode_to_stream(v, stream, True)
 *       else:
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_k, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "apache_beam/coders/coder_impl.py":438
 *         for k, v in ordered_kvs:
 *           self.encode_to_stream(k, stream, True)
 *           self.encode_to_stream(v, stream, True)             # <<<<<<<<<<<<<<
 *       else:
 *         # Loop over dict.items() is optimized by Cython.
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_v, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "apache_beam/coders/coder_impl.py":436
 *               "Unable to deterministically order keys of dict for '%s'" %
 *               self.requires_deterministic_step_label) from exn
 *         for k, v in ordered_kvs:             # <<<<<<<<<<<<<<
 *           self.encode_to_stream(k, stream, True)
 *           self.encode_to_stream(v, stream, True)
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/coders/coder_impl.py":429
 *       stream.write_byte(DICT_TYPE)
 *       stream.write_var_int64(len(dict_value))
 *       if self.requires_deterministic_step_label is not None:             # <<<<<<<<<<<<<<
 *         try:
 *           ordered_kvs = sorted(dict_value.items())
 */
      goto __pyx_L20;
    }

    /* "apache_beam/coders/coder_impl.py":441
 *       else:
 *         # Loop over dict.items() is optimized by Cython.
 *         for k, v in dict_value.items():             # <<<<<<<<<<<<<<
 *           self.encode_to_stream(k, stream, True)
 *           self.encode_to_stream(v, stream, True)
 */
    /*else*/ {
      __pyx_t_18 = 0;
      if (unlikely(__pyx_v_dict_value == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
        __PYX_ERR(0, 441, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_dict_value, 1, __pyx_n_s_items, (&__pyx_t_30), (&__pyx_t_21)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_1;
      __pyx_t_1 = 0;
      while (1) {
        __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_30, &__pyx_t_18, &__pyx_t_1, &__pyx_t_3, NULL, __pyx_t_21);
        if (unlikely(__pyx_t_6 == 0)) break;
        if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "apache_beam/coders/coder_impl.py":442
 *         # Loop over dict.items() is optimized by Cython.
 *         for k, v in dict_value.items():
 *           self.encode_to_stream(k, stream, True)             # <<<<<<<<<<<<<<
 *           self.encode_to_stream(v, stream, True)
 *     elif t is set:
 */
        __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_k, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "apache_beam/coders/coder_impl.py":443
 *         for k, v in dict_value.items():
 *           self.encode_to_stream(k, stream, True)
 *           self.encode_to_stream(v, stream, True)             # <<<<<<<<<<<<<<
 *     elif t is set:
 *       stream.write_byte(SET_TYPE)
 */
        __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_v, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L20:;

    /* "apache_beam/coders/coder_impl.py":425
 *       stream.write_byte(ITERABLE_LIKE_TYPE)
 *       self.iterable_coder_impl.encode_to_stream(value, stream, nested)
 *     elif t is dict:             # <<<<<<<<<<<<<<
 *       dict_value = value  # for typing
 *       stream.write_byte(DICT_TYPE)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":444
 *           self.encode_to_stream(k, stream, True)
 *           self.encode_to_stream(v, stream, True)
 *     elif t is set:             # <<<<<<<<<<<<<<
 *       stream.write_byte(SET_TYPE)
 *       stream.write_var_int64(len(value))
 */
  __pyx_t_8 = (__pyx_v_t == (&PySet_Type));
  __pyx_t_14 = (__pyx_t_8 != 0);
  if (__pyx_t_14) {

    /* "apache_beam/coders/coder_impl.py":445
 *           self.encode_to_stream(v, stream, True)
 *     elif t is set:
 *       stream.write_byte(SET_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write_var_int64(len(value))
 *       if self.requires_deterministic_step_label is not None:
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":446
 *     elif t is set:
 *       stream.write_byte(SET_TYPE)
 *       stream.write_var_int64(len(value))             # <<<<<<<<<<<<<<
 *       if self.requires_deterministic_step_label is not None:
 *         try:
 */
    __pyx_t_30 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_30 == ((Py_ssize_t)-1))) __PYX_ERR(0, 446, __pyx_L1_error)
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_t_30, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":447
 *       stream.write_byte(SET_TYPE)
 *       stream.write_var_int64(len(value))
 *       if self.requires_deterministic_step_label is not None:             # <<<<<<<<<<<<<<
 *         try:
 *           value = sorted(value)
 */
    __pyx_t_14 = (__pyx_v_self->requires_deterministic_step_label != Py_None);
    __pyx_t_8 = (__pyx_t_14 != 0);
    if (__pyx_t_8) {

      /* "apache_beam/coders/coder_impl.py":448
 *       stream.write_var_int64(len(value))
 *       if self.requires_deterministic_step_label is not None:
 *         try:             # <<<<<<<<<<<<<<
 *           value = sorted(value)
 *         except Exception as exn:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "apache_beam/coders/coder_impl.py":449
 *       if self.requires_deterministic_step_label is not None:
 *         try:
 *           value = sorted(value)             # <<<<<<<<<<<<<<
 *         except Exception as exn:
 *           raise TypeError(
 */
          __pyx_t_3 = PySequence_List(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 449, __pyx_L45_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = ((PyObject*)__pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_20 = PyList_Sort(__pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 449, __pyx_L45_error)
          __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "apache_beam/coders/coder_impl.py":448
 *       stream.write_var_int64(len(value))
 *       if self.requires_deterministic_step_label is not None:
 *         try:             # <<<<<<<<<<<<<<
 *           value = sorted(value)
 *         except Exception as exn:
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L50_try_end;
        __pyx_L45_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "apache_beam/coders/coder_impl.py":450
 *         try:
 *           value = sorted(value)
 *         except Exception as exn:             # <<<<<<<<<<<<<<
 *           raise TypeError(
 *               "Unable to deterministically order element of set for '%s'" %
 */
        __pyx_t_21 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
        if (__pyx_t_21) {
          __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 450, __pyx_L47_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __pyx_v_exn = __pyx_t_3;
          /*try:*/ {

            /* "apache_beam/coders/coder_impl.py":452
 *         except Exception as exn:
 *           raise TypeError(
 *               "Unable to deterministically order element of set for '%s'" %             # <<<<<<<<<<<<<<
 *               self.requires_deterministic_step_label) from exn
 *       for e in value:
 */
            __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Unable_to_deterministically_orde_2, __pyx_v_self->requires_deterministic_step_label); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L56_error)
            __Pyx_GOTREF(__pyx_t_2);

            /* "apache_beam/coders/coder_impl.py":451
 *           value = sorted(value)
 *         except Exception as exn:
 *           raise TypeError(             # <<<<<<<<<<<<<<
 *               "Unable to deterministically order element of set for '%s'" %
 *               self.requires_deterministic_step_label) from exn
 */
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 451, __pyx_L56_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "apache_beam/coders/coder_impl.py":453
 *           raise TypeError(
 *               "Unable to deterministically order element of set for '%s'" %
 *               self.requires_deterministic_step_label) from exn             # <<<<<<<<<<<<<<
 *       for e in value:
 *         self.encode_to_stream(e, stream, True)
 */
            __Pyx_Raise(__pyx_t_7, 0, 0, __pyx_v_exn);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __PYX_ERR(0, 451, __pyx_L56_error)
          }

          /* "apache_beam/coders/coder_impl.py":450
 *         try:
 *           value = sorted(value)
 *         except Exception as exn:             # <<<<<<<<<<<<<<
 *           raise TypeError(
 *               "Unable to deterministically order element of set for '%s'" %
 */
          /*finally:*/ {
            __pyx_L56_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23);
              if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_28, &__pyx_t_27, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_28, &__pyx_t_27, &__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_28);
              __Pyx_XGOTREF(__pyx_t_27);
              __Pyx_XGOTREF(__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_25);
              __Pyx_XGOTREF(__pyx_t_24);
              __Pyx_XGOTREF(__pyx_t_23);
              __pyx_t_21 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_31 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_exn);
                __pyx_v_exn = NULL;
              }
              if (PY_MAJOR_VERSION >= 3) {
                __Pyx_XGIVEREF(__pyx_t_25);
                __Pyx_XGIVEREF(__pyx_t_24);
                __Pyx_XGIVEREF(__pyx_t_23);
                __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_24, __pyx_t_23);
              }
              __Pyx_XGIVEREF(__pyx_t_28);
              __Pyx_XGIVEREF(__pyx_t_27);
              __Pyx_XGIVEREF(__pyx_t_26);
              __Pyx_ErrRestore(__pyx_t_28, __pyx_t_27, __pyx_t_26);
              __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0;
              __pyx_lineno = __pyx_t_21; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_31;
              goto __pyx_L47_except_error;
            }
          }
        }
        goto __pyx_L47_except_error;
        __pyx_L47_except_error:;

        /* "apache_beam/coders/coder_impl.py":448
 *       stream.write_var_int64(len(value))
 *       if self.requires_deterministic_step_label is not None:
 *         try:             # <<<<<<<<<<<<<<
 *           value = sorted(value)
 *         except Exception as exn:
 */
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L50_try_end:;
      }

      /* "apache_beam/coders/coder_impl.py":447
 *       stream.write_byte(SET_TYPE)
 *       stream.write_var_int64(len(value))
 *       if self.requires_deterministic_step_label is not None:             # <<<<<<<<<<<<<<
 *         try:
 *           value = sorted(value)
 */
    }

    /* "apache_beam/coders/coder_impl.py":454
 *               "Unable to deterministically order element of set for '%s'" %
 *               self.requires_deterministic_step_label) from exn
 *       for e in value:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(e, stream, True)
 *     # All possibly deterministic encodings should be above this clause,
 */
    if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
      __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __pyx_t_30 = 0;
      __pyx_t_19 = NULL;
    } else {
      __pyx_t_30 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_19 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 454, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_19)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_30 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_30); __Pyx_INCREF(__pyx_t_3); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(0, 454, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_30 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_30); __Pyx_INCREF(__pyx_t_3); __pyx_t_30++; if (unlikely(0 < 0)) __PYX_ERR(0, 454, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_30); __pyx_t_30++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_19(__pyx_t_1);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 454, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "apache_beam/coders/coder_impl.py":455
 *               self.requires_deterministic_step_label) from exn
 *       for e in value:
 *         self.encode_to_stream(e, stream, True)             # <<<<<<<<<<<<<<
 *     # All possibly deterministic encodings should be above this clause,
 *     # all non-deterministic ones below.
 */
      __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_e, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/coders/coder_impl.py":454
 *               "Unable to deterministically order element of set for '%s'" %
 *               self.requires_deterministic_step_label) from exn
 *       for e in value:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(e, stream, True)
 *     # All possibly deterministic encodings should be above this clause,
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":444
 *           self.encode_to_stream(k, stream, True)
 *           self.encode_to_stream(v, stream, True)
 *     elif t is set:             # <<<<<<<<<<<<<<
 *       stream.write_byte(SET_TYPE)
 *       stream.write_var_int64(len(value))
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":458
 *     # All possibly deterministic encodings should be above this clause,
 *     # all non-deterministic ones below.
 *     elif self.requires_deterministic_step_label is not None:             # <<<<<<<<<<<<<<
 *       self.encode_special_deterministic(value, stream)
 *     else:
 */
  __pyx_t_8 = (__pyx_v_self->requires_deterministic_step_label != Py_None);
  __pyx_t_14 = (__pyx_t_8 != 0);
  if (__pyx_t_14) {

    /* "apache_beam/coders/coder_impl.py":459
 *     # all non-deterministic ones below.
 *     elif self.requires_deterministic_step_label is not None:
 *       self.encode_special_deterministic(value, stream)             # <<<<<<<<<<<<<<
 *     else:
 *       stream.write_byte(UNKNOWN_TYPE)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_special_deterministic(__pyx_v_self, __pyx_v_value, __pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":458
 *     # All possibly deterministic encodings should be above this clause,
 *     # all non-deterministic ones below.
 *     elif self.requires_deterministic_step_label is not None:             # <<<<<<<<<<<<<<
 *       self.encode_special_deterministic(value, stream)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":461
 *       self.encode_special_deterministic(value, stream)
 *     else:
 *       stream.write_byte(UNKNOWN_TYPE)             # <<<<<<<<<<<<<<
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 * 
 */
  /*else*/ {
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":462
 *     else:
 *       stream.write_byte(UNKNOWN_TYPE)
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)             # <<<<<<<<<<<<<<
 * 
 *   def encode_special_deterministic(self, value, stream):
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->fallback_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->fallback_coder_impl, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":382
 *     return out.get_count(), []
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     t = type(value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dict_value);
  __Pyx_XDECREF(__pyx_v_unicode_value);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_ordered_kvs);
  __Pyx_XDECREF(__pyx_v_exn);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_stream,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 382, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 382, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 382, __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_value = values[0];
    __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 382, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 382, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 382, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_6encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_6encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":464
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def encode_special_deterministic(self, value, stream):             # <<<<<<<<<<<<<<
 *     if self.warn_deterministic_fallback:
 *       _LOGGER.warning(
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_special_deterministic(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) {
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_state_value = NULL;
  PyObject *__pyx_7genexpr__pyx_v_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_t_25;
  char const *__pyx_t_26;
  unsigned char __pyx_t_27;
  char const *__pyx_t_28;
  char const *__pyx_t_29;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_special_deterministic", 0);

  /* "apache_beam/coders/coder_impl.py":465
 * 
 *   def encode_special_deterministic(self, value, stream):
 *     if self.warn_deterministic_fallback:             # <<<<<<<<<<<<<<
 *       _LOGGER.warning(
 *           "Using fallback deterministic coder for type '%s' in '%s'. ",
 */
  __pyx_t_1 = (__pyx_v_self->warn_deterministic_fallback != 0);
  if (__pyx_t_1) {

    /* "apache_beam/coders/coder_impl.py":466
 *   def encode_special_deterministic(self, value, stream):
 *     if self.warn_deterministic_fallback:
 *       _LOGGER.warning(             # <<<<<<<<<<<<<<
 *           "Using fallback deterministic coder for type '%s' in '%s'. ",
 *           type(value),
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LOGGER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":469
 *           "Using fallback deterministic coder for type '%s' in '%s'. ",
 *           type(value),
 *           self.requires_deterministic_step_label)             # <<<<<<<<<<<<<<
 *       self.warn_deterministic_fallback = False
 *     if isinstance(value, proto_utils.message_types):
 */
    __pyx_t_3 = NULL;
    __pyx_t_5 = 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_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_u_Using_fallback_deterministic_cod, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_self->requires_deterministic_step_label};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_u_Using_fallback_deterministic_cod, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_self->requires_deterministic_step_label};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_kp_u_Using_fallback_deterministic_cod);
      __Pyx_GIVEREF(__pyx_kp_u_Using_fallback_deterministic_cod);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_kp_u_Using_fallback_deterministic_cod);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)Py_TYPE(__pyx_v_value)));
      __Pyx_INCREF(__pyx_v_self->requires_deterministic_step_label);
      __Pyx_GIVEREF(__pyx_v_self->requires_deterministic_step_label);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_self->requires_deterministic_step_label);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":470
 *           type(value),
 *           self.requires_deterministic_step_label)
 *       self.warn_deterministic_fallback = False             # <<<<<<<<<<<<<<
 *     if isinstance(value, proto_utils.message_types):
 *       stream.write_byte(PROTO_TYPE)
 */
    __pyx_v_self->warn_deterministic_fallback = 0;

    /* "apache_beam/coders/coder_impl.py":465
 * 
 *   def encode_special_deterministic(self, value, stream):
 *     if self.warn_deterministic_fallback:             # <<<<<<<<<<<<<<
 *       _LOGGER.warning(
 *           "Using fallback deterministic coder for type '%s' in '%s'. ",
 */
  }

  /* "apache_beam/coders/coder_impl.py":471
 *           self.requires_deterministic_step_label)
 *       self.warn_deterministic_fallback = False
 *     if isinstance(value, proto_utils.message_types):             # <<<<<<<<<<<<<<
 *       stream.write_byte(PROTO_TYPE)
 *       self.encode_type(type(value), stream)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_proto_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_message_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "apache_beam/coders/coder_impl.py":472
 *       self.warn_deterministic_fallback = False
 *     if isinstance(value, proto_utils.message_types):
 *       stream.write_byte(PROTO_TYPE)             # <<<<<<<<<<<<<<
 *       self.encode_type(type(value), stream)
 *       stream.write(value.SerializePartialToString(deterministic=True), True)
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":473
 *     if isinstance(value, proto_utils.message_types):
 *       stream.write_byte(PROTO_TYPE)
 *       self.encode_type(type(value), stream)             # <<<<<<<<<<<<<<
 *       stream.write(value.SerializePartialToString(deterministic=True), True)
 *     elif dataclasses and dataclasses.is_dataclass(value):
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":474
 *       stream.write_byte(PROTO_TYPE)
 *       self.encode_type(type(value), stream)
 *       stream.write(value.SerializePartialToString(deterministic=True), True)             # <<<<<<<<<<<<<<
 *     elif dataclasses and dataclasses.is_dataclass(value):
 *       stream.write_byte(DATACLASS_TYPE)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_SerializePartialToString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_deterministic, Py_True) < 0) __PYX_ERR(0, 474, __pyx_L1_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 474, __pyx_L1_error)
    __pyx_t_8.__pyx_n = 1;
    __pyx_t_8.nested = 1;
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_6), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":471
 *           self.requires_deterministic_step_label)
 *       self.warn_deterministic_fallback = False
 *     if isinstance(value, proto_utils.message_types):             # <<<<<<<<<<<<<<
 *       stream.write_byte(PROTO_TYPE)
 *       self.encode_type(type(value), stream)
 */
    goto __pyx_L4;
  }

  /* "apache_beam/coders/coder_impl.py":475
 *       self.encode_type(type(value), stream)
 *       stream.write(value.SerializePartialToString(deterministic=True), True)
 *     elif dataclasses and dataclasses.is_dataclass(value):             # <<<<<<<<<<<<<<
 *       stream.write_byte(DATACLASS_TYPE)
 *       if not type(value).__dataclass_params__.frozen:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dataclasses); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {
  } else {
    __pyx_t_7 = __pyx_t_1;
    goto __pyx_L5_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_dataclasses); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_dataclass); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __pyx_t_1;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_7) {

    /* "apache_beam/coders/coder_impl.py":476
 *       stream.write(value.SerializePartialToString(deterministic=True), True)
 *     elif dataclasses and dataclasses.is_dataclass(value):
 *       stream.write_byte(DATACLASS_TYPE)             # <<<<<<<<<<<<<<
 *       if not type(value).__dataclass_params__.frozen:
 *         raise TypeError(
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":477
 *     elif dataclasses and dataclasses.is_dataclass(value):
 *       stream.write_byte(DATACLASS_TYPE)
 *       if not type(value).__dataclass_params__.frozen:             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Unable to deterministically encode non-frozen '%s' of type '%s' "
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_n_s_dataclass_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_frozen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = ((!__pyx_t_7) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "apache_beam/coders/coder_impl.py":479
 *       if not type(value).__dataclass_params__.frozen:
 *         raise TypeError(
 *             "Unable to deterministically encode non-frozen '%s' of type '%s' "             # <<<<<<<<<<<<<<
 *             "for the input of '%s'" %
 *             (value, type(value), self.requires_deterministic_step_label))
 */
      __pyx_t_4 = PyTuple_New(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Unable_to_deterministically_enco);
      __pyx_t_9 += 47;
      __Pyx_GIVEREF(__pyx_kp_u_Unable_to_deterministically_enco);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Unable_to_deterministically_enco);

      /* "apache_beam/coders/coder_impl.py":481
 *             "Unable to deterministically encode non-frozen '%s' of type '%s' "
 *             "for the input of '%s'" %
 *             (value, type(value), self.requires_deterministic_step_label))             # <<<<<<<<<<<<<<
 *       self.encode_type(type(value), stream)
 *       values = [
 */
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u_of_type);
      __pyx_t_9 += 11;
      __Pyx_GIVEREF(__pyx_kp_u_of_type);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_of_type);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)Py_TYPE(__pyx_v_value))), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u_for_the_input_of);
      __pyx_t_9 += 20;
      __Pyx_GIVEREF(__pyx_kp_u_for_the_input_of);
      PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u_for_the_input_of);
      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->requires_deterministic_step_label), __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u__3);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__3);
      PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_kp_u__3);

      /* "apache_beam/coders/coder_impl.py":479
 *       if not type(value).__dataclass_params__.frozen:
 *         raise TypeError(
 *             "Unable to deterministically encode non-frozen '%s' of type '%s' "             # <<<<<<<<<<<<<<
 *             "for the input of '%s'" %
 *             (value, type(value), self.requires_deterministic_step_label))
 */
      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 7, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/coders/coder_impl.py":478
 *       stream.write_byte(DATACLASS_TYPE)
 *       if not type(value).__dataclass_params__.frozen:
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Unable to deterministically encode non-frozen '%s' of type '%s' "
 *             "for the input of '%s'" %
 */
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 478, __pyx_L1_error)

      /* "apache_beam/coders/coder_impl.py":477
 *     elif dataclasses and dataclasses.is_dataclass(value):
 *       stream.write_byte(DATACLASS_TYPE)
 *       if not type(value).__dataclass_params__.frozen:             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Unable to deterministically encode non-frozen '%s' of type '%s' "
 */
    }

    /* "apache_beam/coders/coder_impl.py":482
 *             "for the input of '%s'" %
 *             (value, type(value), self.requires_deterministic_step_label))
 *       self.encode_type(type(value), stream)             # <<<<<<<<<<<<<<
 *       values = [
 *           getattr(value, field.name) for field in dataclasses.fields(value)
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":483
 *             (value, type(value), self.requires_deterministic_step_label))
 *       self.encode_type(type(value), stream)
 *       values = [             # <<<<<<<<<<<<<<
 *           getattr(value, field.name) for field in dataclasses.fields(value)
 *       ]
 */
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "apache_beam/coders/coder_impl.py":484
 *       self.encode_type(type(value), stream)
 *       values = [
 *           getattr(value, field.name) for field in dataclasses.fields(value)             # <<<<<<<<<<<<<<
 *       ]
 *       try:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_dataclasses); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 484, __pyx_L10_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 484, __pyx_L10_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 484, __pyx_L10_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_11(__pyx_t_3);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 484, __pyx_L10_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_field, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_7genexpr__pyx_v_field, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_GetAttr(__pyx_v_value, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 483, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_field); __pyx_7genexpr__pyx_v_field = 0;
      goto __pyx_L13_exit_scope;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_field); __pyx_7genexpr__pyx_v_field = 0;
      goto __pyx_L1_error;
      __pyx_L13_exit_scope:;
    } /* exit inner scope */
    __pyx_v_values = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":486
 *           getattr(value, field.name) for field in dataclasses.fields(value)
 *       ]
 *       try:             # <<<<<<<<<<<<<<
 *         self.iterable_coder_impl.encode_to_stream(values, stream, True)
 *       except Exception as e:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      /*try:*/ {

        /* "apache_beam/coders/coder_impl.py":487
 *       ]
 *       try:
 *         self.iterable_coder_impl.encode_to_stream(values, stream, True)             # <<<<<<<<<<<<<<
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 */
        __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_values, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "apache_beam/coders/coder_impl.py":486
 *           getattr(value, field.name) for field in dataclasses.fields(value)
 *       ]
 *       try:             # <<<<<<<<<<<<<<
 *         self.iterable_coder_impl.encode_to_stream(values, stream, True)
 *       except Exception as e:
 */
      }
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L19_try_end;
      __pyx_L14_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "apache_beam/coders/coder_impl.py":488
 *       try:
 *         self.iterable_coder_impl.encode_to_stream(values, stream, True)
 *       except Exception as e:             # <<<<<<<<<<<<<<
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, tuple) and hasattr(type(value), '_fields'):
 */
      __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
      if (__pyx_t_5) {
        __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_6) < 0) __PYX_ERR(0, 488, __pyx_L16_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_v_e = __pyx_t_3;
        /*try:*/ {

          /* "apache_beam/coders/coder_impl.py":489
 *         self.iterable_coder_impl.encode_to_stream(values, stream, True)
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e             # <<<<<<<<<<<<<<
 *     elif isinstance(value, tuple) and hasattr(type(value), '_fields'):
 *       stream.write_byte(NAMED_TUPLE_TYPE)
 */
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deterministic_encoding_error_ms); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 489, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
            }
          }
          __pyx_t_2 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_16, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_value);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 489, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_Raise(__pyx_t_15, 0, 0, __pyx_v_e);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __PYX_ERR(0, 489, __pyx_L25_error)
        }

        /* "apache_beam/coders/coder_impl.py":488
 *       try:
 *         self.iterable_coder_impl.encode_to_stream(values, stream, True)
 *       except Exception as e:             # <<<<<<<<<<<<<<
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, tuple) and hasattr(type(value), '_fields'):
 */
        /*finally:*/ {
          __pyx_L25_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __pyx_t_5 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_e);
              __pyx_v_e = NULL;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_XGIVEREF(__pyx_t_23);
              __Pyx_XGIVEREF(__pyx_t_24);
              __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
            }
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
            goto __pyx_L16_except_error;
          }
        }
      }
      goto __pyx_L16_except_error;
      __pyx_L16_except_error:;

      /* "apache_beam/coders/coder_impl.py":486
 *           getattr(value, field.name) for field in dataclasses.fields(value)
 *       ]
 *       try:             # <<<<<<<<<<<<<<
 *         self.iterable_coder_impl.encode_to_stream(values, stream, True)
 *       except Exception as e:
 */
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      goto __pyx_L1_error;
      __pyx_L19_try_end:;
    }

    /* "apache_beam/coders/coder_impl.py":475
 *       self.encode_type(type(value), stream)
 *       stream.write(value.SerializePartialToString(deterministic=True), True)
 *     elif dataclasses and dataclasses.is_dataclass(value):             # <<<<<<<<<<<<<<
 *       stream.write_byte(DATACLASS_TYPE)
 *       if not type(value).__dataclass_params__.frozen:
 */
    goto __pyx_L4;
  }

  /* "apache_beam/coders/coder_impl.py":490
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, tuple) and hasattr(type(value), '_fields'):             # <<<<<<<<<<<<<<
 *       stream.write_byte(NAMED_TUPLE_TYPE)
 *       self.encode_type(type(value), stream)
 */
  __pyx_t_7 = PyTuple_Check(__pyx_v_value); 
  __pyx_t_25 = (__pyx_t_7 != 0);
  if (__pyx_t_25) {
  } else {
    __pyx_t_1 = __pyx_t_25;
    goto __pyx_L31_bool_binop_done;
  }
  __pyx_t_25 = __Pyx_HasAttr(((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_n_u_fields_2); if (unlikely(__pyx_t_25 == ((int)-1))) __PYX_ERR(0, 490, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_25 != 0);
  __pyx_t_1 = __pyx_t_7;
  __pyx_L31_bool_binop_done:;
  if (__pyx_t_1) {

    /* "apache_beam/coders/coder_impl.py":491
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, tuple) and hasattr(type(value), '_fields'):
 *       stream.write_byte(NAMED_TUPLE_TYPE)             # <<<<<<<<<<<<<<
 *       self.encode_type(type(value), stream)
 *       try:
 */
    __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/coders/coder_impl.py":492
 *     elif isinstance(value, tuple) and hasattr(type(value), '_fields'):
 *       stream.write_byte(NAMED_TUPLE_TYPE)
 *       self.encode_type(type(value), stream)             # <<<<<<<<<<<<<<
 *       try:
 *         self.iterable_coder_impl.encode_to_stream(value, stream, True)
 */
    __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 492, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/coders/coder_impl.py":493
 *       stream.write_byte(NAMED_TUPLE_TYPE)
 *       self.encode_type(type(value), stream)
 *       try:             # <<<<<<<<<<<<<<
 *         self.iterable_coder_impl.encode_to_stream(value, stream, True)
 *       except Exception as e:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_12);
      /*try:*/ {

        /* "apache_beam/coders/coder_impl.py":494
 *       self.encode_type(type(value), stream)
 *       try:
 *         self.iterable_coder_impl.encode_to_stream(value, stream, True)             # <<<<<<<<<<<<<<
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 */
        __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_value, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L33_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "apache_beam/coders/coder_impl.py":493
 *       stream.write_byte(NAMED_TUPLE_TYPE)
 *       self.encode_type(type(value), stream)
 *       try:             # <<<<<<<<<<<<<<
 *         self.iterable_coder_impl.encode_to_stream(value, stream, True)
 *       except Exception as e:
 */
      }
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L38_try_end;
      __pyx_L33_error:;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "apache_beam/coders/coder_impl.py":495
 *       try:
 *         self.iterable_coder_impl.encode_to_stream(value, stream, True)
 *       except Exception as e:             # <<<<<<<<<<<<<<
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, enum.Enum):
 */
      __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
      if (__pyx_t_17) {
        __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 495, __pyx_L35_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_v_e = __pyx_t_3;
        /*try:*/ {

          /* "apache_beam/coders/coder_impl.py":496
 *         self.iterable_coder_impl.encode_to_stream(value, stream, True)
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e             # <<<<<<<<<<<<<<
 *     elif isinstance(value, enum.Enum):
 *       stream.write_byte(ENUM_TYPE)
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deterministic_encoding_error_ms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_16 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_15 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_16, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 496, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_Raise(__pyx_t_2, 0, 0, __pyx_v_e);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(0, 496, __pyx_L44_error)
        }

        /* "apache_beam/coders/coder_impl.py":495
 *       try:
 *         self.iterable_coder_impl.encode_to_stream(value, stream, True)
 *       except Exception as e:             # <<<<<<<<<<<<<<
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, enum.Enum):
 */
        /*finally:*/ {
          __pyx_L44_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_19);
            __pyx_t_17 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_e);
              __pyx_v_e = NULL;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
            }
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ErrRestore(__pyx_t_24, __pyx_t_23, __pyx_t_22);
            __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
            __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_26;
            goto __pyx_L35_except_error;
          }
        }
      }
      goto __pyx_L35_except_error;
      __pyx_L35_except_error:;

      /* "apache_beam/coders/coder_impl.py":493
 *       stream.write_byte(NAMED_TUPLE_TYPE)
 *       self.encode_type(type(value), stream)
 *       try:             # <<<<<<<<<<<<<<
 *         self.iterable_coder_impl.encode_to_stream(value, stream, True)
 *       except Exception as e:
 */
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      goto __pyx_L1_error;
      __pyx_L38_try_end:;
    }

    /* "apache_beam/coders/coder_impl.py":490
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, tuple) and hasattr(type(value), '_fields'):             # <<<<<<<<<<<<<<
 *       stream.write_byte(NAMED_TUPLE_TYPE)
 *       self.encode_type(type(value), stream)
 */
    goto __pyx_L4;
  }

  /* "apache_beam/coders/coder_impl.py":497
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, enum.Enum):             # <<<<<<<<<<<<<<
 *       stream.write_byte(ENUM_TYPE)
 *       self.encode_type(type(value), stream)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "apache_beam/coders/coder_impl.py":498
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, enum.Enum):
 *       stream.write_byte(ENUM_TYPE)             # <<<<<<<<<<<<<<
 *       self.encode_type(type(value), stream)
 *       # Enum values can be of any type.
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ENUM_TYPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_27 = __Pyx_PyInt_As_unsigned_char(__pyx_t_3); if (unlikely((__pyx_t_27 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_27, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":499
 *     elif isinstance(value, enum.Enum):
 *       stream.write_byte(ENUM_TYPE)
 *       self.encode_type(type(value), stream)             # <<<<<<<<<<<<<<
 *       # Enum values can be of any type.
 *       try:
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":501
 *       self.encode_type(type(value), stream)
 *       # Enum values can be of any type.
 *       try:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(value.value, stream, True)
 *       except Exception as e:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      /*try:*/ {

        /* "apache_beam/coders/coder_impl.py":502
 *       # Enum values can be of any type.
 *       try:
 *         self.encode_to_stream(value.value, stream, True)             # <<<<<<<<<<<<<<
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_t_3, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 502, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "apache_beam/coders/coder_impl.py":501
 *       self.encode_type(type(value), stream)
 *       # Enum values can be of any type.
 *       try:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(value.value, stream, True)
 *       except Exception as e:
 */
      }
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L55_try_end;
      __pyx_L50_error:;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "apache_beam/coders/coder_impl.py":503
 *       try:
 *         self.encode_to_stream(value.value, stream, True)
 *       except Exception as e:             # <<<<<<<<<<<<<<
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif hasattr(value, "__getstate__"):
 */
      __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
      if (__pyx_t_5) {
        __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_6) < 0) __PYX_ERR(0, 503, __pyx_L52_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_v_e = __pyx_t_3;
        /*try:*/ {

          /* "apache_beam/coders/coder_impl.py":504
 *         self.encode_to_stream(value.value, stream, True)
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e             # <<<<<<<<<<<<<<
 *     elif hasattr(value, "__getstate__"):
 *       if not hasattr(value, "__setstate__"):
 */
          __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deterministic_encoding_error_ms); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 504, __pyx_L61_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_15, function);
            }
          }
          __pyx_t_2 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_16, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_value);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L61_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 504, __pyx_L61_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_Raise(__pyx_t_15, 0, 0, __pyx_v_e);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __PYX_ERR(0, 504, __pyx_L61_error)
        }

        /* "apache_beam/coders/coder_impl.py":503
 *       try:
 *         self.encode_to_stream(value.value, stream, True)
 *       except Exception as e:             # <<<<<<<<<<<<<<
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif hasattr(value, "__getstate__"):
 */
        /*finally:*/ {
          __pyx_L61_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __pyx_t_5 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_28 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_e);
              __pyx_v_e = NULL;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_XGIVEREF(__pyx_t_23);
              __Pyx_XGIVEREF(__pyx_t_24);
              __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
            }
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
            __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
            __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_28;
            goto __pyx_L52_except_error;
          }
        }
      }
      goto __pyx_L52_except_error;
      __pyx_L52_except_error:;

      /* "apache_beam/coders/coder_impl.py":501
 *       self.encode_type(type(value), stream)
 *       # Enum values can be of any type.
 *       try:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(value.value, stream, True)
 *       except Exception as e:
 */
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      goto __pyx_L1_error;
      __pyx_L55_try_end:;
    }

    /* "apache_beam/coders/coder_impl.py":497
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif isinstance(value, enum.Enum):             # <<<<<<<<<<<<<<
 *       stream.write_byte(ENUM_TYPE)
 *       self.encode_type(type(value), stream)
 */
    goto __pyx_L4;
  }

  /* "apache_beam/coders/coder_impl.py":505
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif hasattr(value, "__getstate__"):             # <<<<<<<<<<<<<<
 *       if not hasattr(value, "__setstate__"):
 *         raise TypeError(
 */
  __pyx_t_7 = __Pyx_HasAttr(__pyx_v_value, __pyx_n_u_getstate); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 505, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_7 != 0);
  if (likely(__pyx_t_1)) {

    /* "apache_beam/coders/coder_impl.py":506
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif hasattr(value, "__getstate__"):
 *       if not hasattr(value, "__setstate__"):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Unable to deterministically encode '%s' of type '%s', "
 */
    __pyx_t_1 = __Pyx_HasAttr(__pyx_v_value, __pyx_n_u_setstate); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 506, __pyx_L1_error)
    __pyx_t_7 = ((!(__pyx_t_1 != 0)) != 0);
    if (unlikely(__pyx_t_7)) {

      /* "apache_beam/coders/coder_impl.py":508
 *       if not hasattr(value, "__setstate__"):
 *         raise TypeError(
 *             "Unable to deterministically encode '%s' of type '%s', "             # <<<<<<<<<<<<<<
 *             "for the input of '%s'. The object defines __getstate__ but not "
 *             "__setstate__." %
 */
      __pyx_t_6 = PyTuple_New(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Unable_to_deterministically_enco_2);
      __pyx_t_9 += 36;
      __Pyx_GIVEREF(__pyx_kp_u_Unable_to_deterministically_enco_2);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Unable_to_deterministically_enco_2);

      /* "apache_beam/coders/coder_impl.py":511
 *             "for the input of '%s'. The object defines __getstate__ but not "
 *             "__setstate__." %
 *             (value, type(value), self.requires_deterministic_step_label))             # <<<<<<<<<<<<<<
 *       stream.write_byte(NESTED_STATE_TYPE)
 *       self.encode_type(type(value), stream)
 */
      __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u_of_type);
      __pyx_t_9 += 11;
      __Pyx_GIVEREF(__pyx_kp_u_of_type);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_of_type);
      __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)Py_TYPE(__pyx_v_value))), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u_for_the_input_of_2);
      __pyx_t_9 += 21;
      __Pyx_GIVEREF(__pyx_kp_u_for_the_input_of_2);
      PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u_for_the_input_of_2);
      __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->requires_deterministic_step_label), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_6, 5, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_kp_u_The_object_defines___getstate);
      __pyx_t_9 += 56;
      __Pyx_GIVEREF(__pyx_kp_u_The_object_defines___getstate);
      PyTuple_SET_ITEM(__pyx_t_6, 6, __pyx_kp_u_The_object_defines___getstate);

      /* "apache_beam/coders/coder_impl.py":508
 *       if not hasattr(value, "__setstate__"):
 *         raise TypeError(
 *             "Unable to deterministically encode '%s' of type '%s', "             # <<<<<<<<<<<<<<
 *             "for the input of '%s'. The object defines __getstate__ but not "
 *             "__setstate__." %
 */
      __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 7, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "apache_beam/coders/coder_impl.py":507
 *     elif hasattr(value, "__getstate__"):
 *       if not hasattr(value, "__setstate__"):
 *         raise TypeError(             # <<<<<<<<<<<<<<
 *             "Unable to deterministically encode '%s' of type '%s', "
 *             "for the input of '%s'. The object defines __getstate__ but not "
 */
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(0, 507, __pyx_L1_error)

      /* "apache_beam/coders/coder_impl.py":506
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif hasattr(value, "__getstate__"):
 *       if not hasattr(value, "__setstate__"):             # <<<<<<<<<<<<<<
 *         raise TypeError(
 *             "Unable to deterministically encode '%s' of type '%s', "
 */
    }

    /* "apache_beam/coders/coder_impl.py":512
 *             "__setstate__." %
 *             (value, type(value), self.requires_deterministic_step_label))
 *       stream.write_byte(NESTED_STATE_TYPE)             # <<<<<<<<<<<<<<
 *       self.encode_type(type(value), stream)
 *       state_value = value.__getstate__()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_NESTED_STATE_TYPE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_27 = __Pyx_PyInt_As_unsigned_char(__pyx_t_6); if (unlikely((__pyx_t_27 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_27, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/coders/coder_impl.py":513
 *             (value, type(value), self.requires_deterministic_step_label))
 *       stream.write_byte(NESTED_STATE_TYPE)
 *       self.encode_type(type(value), stream)             # <<<<<<<<<<<<<<
 *       state_value = value.__getstate__()
 *       try:
 */
    __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->encode_type(__pyx_v_self, ((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_v_stream); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "apache_beam/coders/coder_impl.py":514
 *       stream.write_byte(NESTED_STATE_TYPE)
 *       self.encode_type(type(value), stream)
 *       state_value = value.__getstate__()             # <<<<<<<<<<<<<<
 *       try:
 *         self.encode_to_stream(state_value, stream, True)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_state_value = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "apache_beam/coders/coder_impl.py":515
 *       self.encode_type(type(value), stream)
 *       state_value = value.__getstate__()
 *       try:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(state_value, stream, True)
 *       except Exception as e:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_12);
      /*try:*/ {

        /* "apache_beam/coders/coder_impl.py":516
 *       state_value = value.__getstate__()
 *       try:
 *         self.encode_to_stream(state_value, stream, True)             # <<<<<<<<<<<<<<
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 */
        __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_state_value, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 516, __pyx_L68_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "apache_beam/coders/coder_impl.py":515
 *       self.encode_type(type(value), stream)
 *       state_value = value.__getstate__()
 *       try:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(state_value, stream, True)
 *       except Exception as e:
 */
      }
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L73_try_end;
      __pyx_L68_error:;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "apache_beam/coders/coder_impl.py":517
 *       try:
 *         self.encode_to_stream(state_value, stream, True)
 *       except Exception as e:             # <<<<<<<<<<<<<<
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     else:
 */
      __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
      if (__pyx_t_17) {
        __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 517, __pyx_L70_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_v_e = __pyx_t_3;
        /*try:*/ {

          /* "apache_beam/coders/coder_impl.py":518
 *         self.encode_to_stream(state_value, stream, True)
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e             # <<<<<<<<<<<<<<
 *     else:
 *       raise TypeError(self._deterministic_encoding_error_msg(value))
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deterministic_encoding_error_ms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L79_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_16 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_15 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_16, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 518, __pyx_L79_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L79_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_Raise(__pyx_t_2, 0, 0, __pyx_v_e);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(0, 518, __pyx_L79_error)
        }

        /* "apache_beam/coders/coder_impl.py":517
 *       try:
 *         self.encode_to_stream(state_value, stream, True)
 *       except Exception as e:             # <<<<<<<<<<<<<<
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     else:
 */
        /*finally:*/ {
          __pyx_L79_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_19);
            __pyx_t_17 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_29 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_e);
              __pyx_v_e = NULL;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
            }
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ErrRestore(__pyx_t_24, __pyx_t_23, __pyx_t_22);
            __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
            __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_29;
            goto __pyx_L70_except_error;
          }
        }
      }
      goto __pyx_L70_except_error;
      __pyx_L70_except_error:;

      /* "apache_beam/coders/coder_impl.py":515
 *       self.encode_type(type(value), stream)
 *       state_value = value.__getstate__()
 *       try:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(state_value, stream, True)
 *       except Exception as e:
 */
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      goto __pyx_L1_error;
      __pyx_L73_try_end:;
    }

    /* "apache_beam/coders/coder_impl.py":505
 *       except Exception as e:
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     elif hasattr(value, "__getstate__"):             # <<<<<<<<<<<<<<
 *       if not hasattr(value, "__setstate__"):
 *         raise TypeError(
 */
    goto __pyx_L4;
  }

  /* "apache_beam/coders/coder_impl.py":520
 *         raise TypeError(self._deterministic_encoding_error_msg(value)) from e
 *     else:
 *       raise TypeError(self._deterministic_encoding_error_msg(value))             # <<<<<<<<<<<<<<
 * 
 *   def _deterministic_encoding_error_msg(self, value):
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_deterministic_encoding_error_ms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 520, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "apache_beam/coders/coder_impl.py":464
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def encode_special_deterministic(self, value, stream):             # <<<<<<<<<<<<<<
 *     if self.warn_deterministic_fallback:
 *       _LOGGER.warning(
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_special_deterministic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_state_value);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_field);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":522
 *       raise TypeError(self._deterministic_encoding_error_msg(value))
 * 
 *   def _deterministic_encoding_error_msg(self, value):             # <<<<<<<<<<<<<<
 *     return (
 *         "Unable to deterministically encode '%s' of type '%s', "
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg = {"_deterministic_encoding_error_msg", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_deterministic_encoding_error_msg (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_8_deterministic_encoding_error_msg(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_8_deterministic_encoding_error_msg(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_deterministic_encoding_error_msg", 0);

  /* "apache_beam/coders/coder_impl.py":523
 * 
 *   def _deterministic_encoding_error_msg(self, value):
 *     return (             # <<<<<<<<<<<<<<
 *         "Unable to deterministically encode '%s' of type '%s', "
 *         "please provide a type hint for the input of '%s'" %
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":524
 *   def _deterministic_encoding_error_msg(self, value):
 *     return (
 *         "Unable to deterministically encode '%s' of type '%s', "             # <<<<<<<<<<<<<<
 *         "please provide a type hint for the input of '%s'" %
 *         (value, type(value), self.requires_deterministic_step_label))
 */
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_Unable_to_deterministically_enco_2);
  __pyx_t_2 += 36;
  __Pyx_GIVEREF(__pyx_kp_u_Unable_to_deterministically_enco_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Unable_to_deterministically_enco_2);

  /* "apache_beam/coders/coder_impl.py":526
 *         "Unable to deterministically encode '%s' of type '%s', "
 *         "please provide a type hint for the input of '%s'" %
 *         (value, type(value), self.requires_deterministic_step_label))             # <<<<<<<<<<<<<<
 * 
 *   def encode_type(self, t, stream):
 */
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __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, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_of_type);
  __pyx_t_2 += 11;
  __Pyx_GIVEREF(__pyx_kp_u_of_type);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_of_type);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(((PyObject *)Py_TYPE(__pyx_v_value))), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __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, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_please_provide_a_type_hint_for);
  __pyx_t_2 += 48;
  __Pyx_GIVEREF(__pyx_kp_u_please_provide_a_type_hint_for);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_please_provide_a_type_hint_for);
  __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_self->requires_deterministic_step_label), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __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, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);

  /* "apache_beam/coders/coder_impl.py":524
 *   def _deterministic_encoding_error_msg(self, value):
 *     return (
 *         "Unable to deterministically encode '%s' of type '%s', "             # <<<<<<<<<<<<<<
 *         "please provide a type hint for the input of '%s'" %
 *         (value, type(value), self.requires_deterministic_step_label))
 */
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":522
 *       raise TypeError(self._deterministic_encoding_error_msg(value))
 * 
 *   def _deterministic_encoding_error_msg(self, value):             # <<<<<<<<<<<<<<
 *     return (
 *         "Unable to deterministically encode '%s' of type '%s', "
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl._deterministic_encoding_error_msg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":528
 *         (value, type(value), self.requires_deterministic_step_label))
 * 
 *   def encode_type(self, t, stream):             # <<<<<<<<<<<<<<
 *     stream.write(dill.dumps(t), True)
 * 
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_type(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_type", 0);

  /* "apache_beam/coders/coder_impl.py":529
 * 
 *   def encode_type(self, t, stream):
 *     stream.write(dill.dumps(t), True)             # <<<<<<<<<<<<<<
 * 
 *   def decode_type(self, stream):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dill); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_t) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_t);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 529, __pyx_L1_error)
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.nested = 1;
  __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_1), 0, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":528
 *         (value, type(value), self.requires_deterministic_step_label))
 * 
 *   def encode_type(self, t, stream):             # <<<<<<<<<<<<<<
 *     stream.write(dill.dumps(t), True)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.encode_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":531
 *     stream.write(dill.dumps(t), True)
 * 
 *   def decode_type(self, stream):             # <<<<<<<<<<<<<<
 *     return _unpickle_type(stream.read_all(True))
 * 
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_type(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_type", 0);

  /* "apache_beam/coders/coder_impl.py":532
 * 
 *   def decode_type(self, stream):
 *     return _unpickle_type(stream.read_all(True))             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, stream, nested):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unpickle_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.nested = 1;
  __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":531
 *     stream.write(dill.dumps(t), True)
 * 
 *   def decode_type(self, stream):             # <<<<<<<<<<<<<<
 *     return _unpickle_type(stream.read_all(True))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.decode_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":534
 *     return _unpickle_type(stream.read_all(True))
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     t = stream.read_byte()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  int __pyx_v_t;
  int64_t __pyx_v_vlen;
  PyObject *__pyx_v_vlist = NULL;
  PyObject *__pyx_v_v = NULL;
  CYTHON_UNUSED int64_t __pyx_v__;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_cls = NULL;
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v_value = NULL;
  CYTHON_UNUSED int64_t __pyx_8genexpr1__pyx_v__;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  long __pyx_t_8;
  int __pyx_t_9;
  int64_t __pyx_t_10;
  double __pyx_t_11;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_12;
  int __pyx_t_13;
  int64_t __pyx_t_14;
  int64_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __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_stream), __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, 534, __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_stream), __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, 534, __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, 534, __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_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __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, 534, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":536
 *   def decode_from_stream(self, stream, nested):
 *     # type: (create_InputStream, bool) -> Any
 *     t = stream.read_byte()             # <<<<<<<<<<<<<<
 *     if t == NONE_TYPE:
 *       return None
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_byte(__pyx_v_stream, 0); if (unlikely(__pyx_t_8 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 536, __pyx_L1_error)
  __pyx_v_t = __pyx_t_8;

  /* "apache_beam/coders/coder_impl.py":537
 *     # type: (create_InputStream, bool) -> Any
 *     t = stream.read_byte()
 *     if t == NONE_TYPE:             # <<<<<<<<<<<<<<
 *       return None
 *     elif t == INT_TYPE:
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":538
 *     t = stream.read_byte()
 *     if t == NONE_TYPE:
 *       return None             # <<<<<<<<<<<<<<
 *     elif t == INT_TYPE:
 *       return stream.read_var_int64()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":537
 *     # type: (create_InputStream, bool) -> Any
 *     t = stream.read_byte()
 *     if t == NONE_TYPE:             # <<<<<<<<<<<<<<
 *       return None
 *     elif t == INT_TYPE:
 */
  }

  /* "apache_beam/coders/coder_impl.py":539
 *     if t == NONE_TYPE:
 *       return None
 *     elif t == INT_TYPE:             # <<<<<<<<<<<<<<
 *       return stream.read_var_int64()
 *     elif t == FLOAT_TYPE:
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":540
 *       return None
 *     elif t == INT_TYPE:
 *       return stream.read_var_int64()             # <<<<<<<<<<<<<<
 *     elif t == FLOAT_TYPE:
 *       return stream.read_bigendian_double()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_var_int64(__pyx_v_stream, 0); if (unlikely(__pyx_t_10 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":539
 *     if t == NONE_TYPE:
 *       return None
 *     elif t == INT_TYPE:             # <<<<<<<<<<<<<<
 *       return stream.read_var_int64()
 *     elif t == FLOAT_TYPE:
 */
  }

  /* "apache_beam/coders/coder_impl.py":541
 *     elif t == INT_TYPE:
 *       return stream.read_var_int64()
 *     elif t == FLOAT_TYPE:             # <<<<<<<<<<<<<<
 *       return stream.read_bigendian_double()
 *     elif t == BYTES_TYPE:
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":542
 *       return stream.read_var_int64()
 *     elif t == FLOAT_TYPE:
 *       return stream.read_bigendian_double()             # <<<<<<<<<<<<<<
 *     elif t == BYTES_TYPE:
 *       return stream.read_all(nested)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_bigendian_double(__pyx_v_stream, 0); if (unlikely(__pyx_t_11 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L1_error)
    __pyx_t_1 = PyFloat_FromDouble(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":541
 *     elif t == INT_TYPE:
 *       return stream.read_var_int64()
 *     elif t == FLOAT_TYPE:             # <<<<<<<<<<<<<<
 *       return stream.read_bigendian_double()
 *     elif t == BYTES_TYPE:
 */
  }

  /* "apache_beam/coders/coder_impl.py":543
 *     elif t == FLOAT_TYPE:
 *       return stream.read_bigendian_double()
 *     elif t == BYTES_TYPE:             # <<<<<<<<<<<<<<
 *       return stream.read_all(nested)
 *     elif t == UNICODE_TYPE:
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":544
 *       return stream.read_bigendian_double()
 *     elif t == BYTES_TYPE:
 *       return stream.read_all(nested)             # <<<<<<<<<<<<<<
 *     elif t == UNICODE_TYPE:
 *       return stream.read_all(nested).decode('utf-8')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.nested = __pyx_v_nested;
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":543
 *     elif t == FLOAT_TYPE:
 *       return stream.read_bigendian_double()
 *     elif t == BYTES_TYPE:             # <<<<<<<<<<<<<<
 *       return stream.read_all(nested)
 *     elif t == UNICODE_TYPE:
 */
  }

  /* "apache_beam/coders/coder_impl.py":545
 *     elif t == BYTES_TYPE:
 *       return stream.read_all(nested)
 *     elif t == UNICODE_TYPE:             # <<<<<<<<<<<<<<
 *       return stream.read_all(nested).decode('utf-8')
 *     elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE:
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":546
 *       return stream.read_all(nested)
 *     elif t == UNICODE_TYPE:
 *       return stream.read_all(nested).decode('utf-8')             # <<<<<<<<<<<<<<
 *     elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE:
 *       vlen = stream.read_var_int64()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.nested = __pyx_v_nested;
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
      __PYX_ERR(0, 546, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":545
 *     elif t == BYTES_TYPE:
 *       return stream.read_all(nested)
 *     elif t == UNICODE_TYPE:             # <<<<<<<<<<<<<<
 *       return stream.read_all(nested).decode('utf-8')
 *     elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE:
 */
  }

  /* "apache_beam/coders/coder_impl.py":547
 *     elif t == UNICODE_TYPE:
 *       return stream.read_all(nested).decode('utf-8')
 *     elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE:             # <<<<<<<<<<<<<<
 *       vlen = stream.read_var_int64()
 *       vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)]
 */
  __pyx_t_13 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE) != 0);
  if (!__pyx_t_13) {
  } else {
    __pyx_t_9 = __pyx_t_13;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_13 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE) != 0);
  if (!__pyx_t_13) {
  } else {
    __pyx_t_9 = __pyx_t_13;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_13 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE) != 0);
  __pyx_t_9 = __pyx_t_13;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":548
 *       return stream.read_all(nested).decode('utf-8')
 *     elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE:
 *       vlen = stream.read_var_int64()             # <<<<<<<<<<<<<<
 *       vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)]
 *       if t == LIST_TYPE:
 */
    __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_var_int64(__pyx_v_stream, 0); if (unlikely(__pyx_t_10 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 548, __pyx_L1_error)
    __pyx_v_vlen = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":549
 *     elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE:
 *       vlen = stream.read_var_int64()
 *       vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)]             # <<<<<<<<<<<<<<
 *       if t == LIST_TYPE:
 *         return vlist
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = __pyx_v_vlen;
      __pyx_t_14 = __pyx_t_10;
      for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
        __pyx_8genexpr1__pyx_v__ = __pyx_t_15;
        __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 549, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
    } /* exit inner scope */
    __pyx_v_vlist = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":550
 *       vlen = stream.read_var_int64()
 *       vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)]
 *       if t == LIST_TYPE:             # <<<<<<<<<<<<<<
 *         return vlist
 *       elif t == TUPLE_TYPE:
 */
    __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE) != 0);
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":551
 *       vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)]
 *       if t == LIST_TYPE:
 *         return vlist             # <<<<<<<<<<<<<<
 *       elif t == TUPLE_TYPE:
 *         return tuple(vlist)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_vlist);
      __pyx_r = __pyx_v_vlist;
      goto __pyx_L0;

      /* "apache_beam/coders/coder_impl.py":550
 *       vlen = stream.read_var_int64()
 *       vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)]
 *       if t == LIST_TYPE:             # <<<<<<<<<<<<<<
 *         return vlist
 *       elif t == TUPLE_TYPE:
 */
    }

    /* "apache_beam/coders/coder_impl.py":552
 *       if t == LIST_TYPE:
 *         return vlist
 *       elif t == TUPLE_TYPE:             # <<<<<<<<<<<<<<
 *         return tuple(vlist)
 *       return set(vlist)
 */
    __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE) != 0);
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":553
 *         return vlist
 *       elif t == TUPLE_TYPE:
 *         return tuple(vlist)             # <<<<<<<<<<<<<<
 *       return set(vlist)
 *     elif t == DICT_TYPE:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyList_AsTuple(__pyx_v_vlist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "apache_beam/coders/coder_impl.py":552
 *       if t == LIST_TYPE:
 *         return vlist
 *       elif t == TUPLE_TYPE:             # <<<<<<<<<<<<<<
 *         return tuple(vlist)
 *       return set(vlist)
 */
    }

    /* "apache_beam/coders/coder_impl.py":554
 *       elif t == TUPLE_TYPE:
 *         return tuple(vlist)
 *       return set(vlist)             # <<<<<<<<<<<<<<
 *     elif t == DICT_TYPE:
 *       vlen = stream.read_var_int64()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PySet_New(__pyx_v_vlist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":547
 *     elif t == UNICODE_TYPE:
 *       return stream.read_all(nested).decode('utf-8')
 *     elif t == LIST_TYPE or t == TUPLE_TYPE or t == SET_TYPE:             # <<<<<<<<<<<<<<
 *       vlen = stream.read_var_int64()
 *       vlist = [self.decode_from_stream(stream, True) for _ in range(vlen)]
 */
  }

  /* "apache_beam/coders/coder_impl.py":555
 *         return tuple(vlist)
 *       return set(vlist)
 *     elif t == DICT_TYPE:             # <<<<<<<<<<<<<<
 *       vlen = stream.read_var_int64()
 *       v = {}
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":556
 *       return set(vlist)
 *     elif t == DICT_TYPE:
 *       vlen = stream.read_var_int64()             # <<<<<<<<<<<<<<
 *       v = {}
 *       for _ in range(vlen):
 */
    __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_var_int64(__pyx_v_stream, 0); if (unlikely(__pyx_t_10 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 556, __pyx_L1_error)
    __pyx_v_vlen = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":557
 *     elif t == DICT_TYPE:
 *       vlen = stream.read_var_int64()
 *       v = {}             # <<<<<<<<<<<<<<
 *       for _ in range(vlen):
 *         k = self.decode_from_stream(stream, True)
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_v = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":558
 *       vlen = stream.read_var_int64()
 *       v = {}
 *       for _ in range(vlen):             # <<<<<<<<<<<<<<
 *         k = self.decode_from_stream(stream, True)
 *         v[k] = self.decode_from_stream(stream, True)
 */
    __pyx_t_10 = __pyx_v_vlen;
    __pyx_t_14 = __pyx_t_10;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v__ = __pyx_t_15;

      /* "apache_beam/coders/coder_impl.py":559
 *       v = {}
 *       for _ in range(vlen):
 *         k = self.decode_from_stream(stream, True)             # <<<<<<<<<<<<<<
 *         v[k] = self.decode_from_stream(stream, True)
 *       return v
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":560
 *       for _ in range(vlen):
 *         k = self.decode_from_stream(stream, True)
 *         v[k] = self.decode_from_stream(stream, True)             # <<<<<<<<<<<<<<
 *       return v
 *     elif t == BOOL_TYPE:
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyDict_SetItem(__pyx_v_v, __pyx_v_k, __pyx_t_2) < 0)) __PYX_ERR(0, 560, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "apache_beam/coders/coder_impl.py":561
 *         k = self.decode_from_stream(stream, True)
 *         v[k] = self.decode_from_stream(stream, True)
 *       return v             # <<<<<<<<<<<<<<
 *     elif t == BOOL_TYPE:
 *       return not not stream.read_byte()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_v);
    __pyx_r = __pyx_v_v;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":555
 *         return tuple(vlist)
 *       return set(vlist)
 *     elif t == DICT_TYPE:             # <<<<<<<<<<<<<<
 *       vlen = stream.read_var_int64()
 *       v = {}
 */
  }

  /* "apache_beam/coders/coder_impl.py":562
 *         v[k] = self.decode_from_stream(stream, True)
 *       return v
 *     elif t == BOOL_TYPE:             # <<<<<<<<<<<<<<
 *       return not not stream.read_byte()
 *     elif t == ITERABLE_LIKE_TYPE:
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":563
 *       return v
 *     elif t == BOOL_TYPE:
 *       return not not stream.read_byte()             # <<<<<<<<<<<<<<
 *     elif t == ITERABLE_LIKE_TYPE:
 *       return self.iterable_coder_impl.decode_from_stream(stream, nested)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_byte(__pyx_v_stream, 0); if (unlikely(__pyx_t_8 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 563, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyBool_FromLong((!((!(__pyx_t_8 != 0)) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":562
 *         v[k] = self.decode_from_stream(stream, True)
 *       return v
 *     elif t == BOOL_TYPE:             # <<<<<<<<<<<<<<
 *       return not not stream.read_byte()
 *     elif t == ITERABLE_LIKE_TYPE:
 */
  }

  /* "apache_beam/coders/coder_impl.py":564
 *     elif t == BOOL_TYPE:
 *       return not not stream.read_byte()
 *     elif t == ITERABLE_LIKE_TYPE:             # <<<<<<<<<<<<<<
 *       return self.iterable_coder_impl.decode_from_stream(stream, nested)
 *     elif t == PROTO_TYPE:
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":565
 *       return not not stream.read_byte()
 *     elif t == ITERABLE_LIKE_TYPE:
 *       return self.iterable_coder_impl.decode_from_stream(stream, nested)             # <<<<<<<<<<<<<<
 *     elif t == PROTO_TYPE:
 *       cls = self.decode_type(stream)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->decode_from_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":564
 *     elif t == BOOL_TYPE:
 *       return not not stream.read_byte()
 *     elif t == ITERABLE_LIKE_TYPE:             # <<<<<<<<<<<<<<
 *       return self.iterable_coder_impl.decode_from_stream(stream, nested)
 *     elif t == PROTO_TYPE:
 */
  }

  /* "apache_beam/coders/coder_impl.py":566
 *     elif t == ITERABLE_LIKE_TYPE:
 *       return self.iterable_coder_impl.decode_from_stream(stream, nested)
 *     elif t == PROTO_TYPE:             # <<<<<<<<<<<<<<
 *       cls = self.decode_type(stream)
 *       msg = cls()
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":567
 *       return self.iterable_coder_impl.decode_from_stream(stream, nested)
 *     elif t == PROTO_TYPE:
 *       cls = self.decode_type(stream)             # <<<<<<<<<<<<<<
 *       msg = cls()
 *       msg.ParseFromString(stream.read_all(True))
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->decode_type(__pyx_v_self, __pyx_v_stream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_cls = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":568
 *     elif t == PROTO_TYPE:
 *       cls = self.decode_type(stream)
 *       msg = cls()             # <<<<<<<<<<<<<<
 *       msg.ParseFromString(stream.read_all(True))
 *       return msg
 */
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_1 = __pyx_v_cls; __pyx_t_4 = NULL;
    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_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_msg = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":569
 *       cls = self.decode_type(stream)
 *       msg = cls()
 *       msg.ParseFromString(stream.read_all(True))             # <<<<<<<<<<<<<<
 *       return msg
 *     elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_msg, __pyx_n_s_ParseFromString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.nested = 1;
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream->__pyx_vtab)->read_all(__pyx_v_stream, 0, &__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 569, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":570
 *       msg = cls()
 *       msg.ParseFromString(stream.read_all(True))
 *       return msg             # <<<<<<<<<<<<<<
 *     elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE:
 *       cls = self.decode_type(stream)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_msg);
    __pyx_r = __pyx_v_msg;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":566
 *     elif t == ITERABLE_LIKE_TYPE:
 *       return self.iterable_coder_impl.decode_from_stream(stream, nested)
 *     elif t == PROTO_TYPE:             # <<<<<<<<<<<<<<
 *       cls = self.decode_type(stream)
 *       msg = cls()
 */
  }

  /* "apache_beam/coders/coder_impl.py":571
 *       msg.ParseFromString(stream.read_all(True))
 *       return msg
 *     elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE:             # <<<<<<<<<<<<<<
 *       cls = self.decode_type(stream)
 *       return cls(*self.iterable_coder_impl.decode_from_stream(stream, True))
 */
  __pyx_t_13 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE) != 0);
  if (!__pyx_t_13) {
  } else {
    __pyx_t_9 = __pyx_t_13;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_13 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE) != 0);
  __pyx_t_9 = __pyx_t_13;
  __pyx_L12_bool_binop_done:;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":572
 *       return msg
 *     elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE:
 *       cls = self.decode_type(stream)             # <<<<<<<<<<<<<<
 *       return cls(*self.iterable_coder_impl.decode_from_stream(stream, True))
 *     elif t == ENUM_TYPE:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->decode_type(__pyx_v_self, __pyx_v_stream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_cls = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":573
 *     elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE:
 *       cls = self.decode_type(stream)
 *       return cls(*self.iterable_coder_impl.decode_from_stream(stream, True))             # <<<<<<<<<<<<<<
 *     elif t == ENUM_TYPE:
 *       cls = self.decode_type(stream)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->iterable_coder_impl->__pyx_vtab)->decode_from_stream(__pyx_v_self->iterable_coder_impl, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":571
 *       msg.ParseFromString(stream.read_all(True))
 *       return msg
 *     elif t == DATACLASS_TYPE or t == NAMED_TUPLE_TYPE:             # <<<<<<<<<<<<<<
 *       cls = self.decode_type(stream)
 *       return cls(*self.iterable_coder_impl.decode_from_stream(stream, True))
 */
  }

  /* "apache_beam/coders/coder_impl.py":574
 *       cls = self.decode_type(stream)
 *       return cls(*self.iterable_coder_impl.decode_from_stream(stream, True))
 *     elif t == ENUM_TYPE:             # <<<<<<<<<<<<<<
 *       cls = self.decode_type(stream)
 *       return cls(self.decode_from_stream(stream, True))
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ENUM_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":575
 *       return cls(*self.iterable_coder_impl.decode_from_stream(stream, True))
 *     elif t == ENUM_TYPE:
 *       cls = self.decode_type(stream)             # <<<<<<<<<<<<<<
 *       return cls(self.decode_from_stream(stream, True))
 *     elif t == NESTED_STATE_TYPE:
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->decode_type(__pyx_v_self, __pyx_v_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_cls = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":576
 *     elif t == ENUM_TYPE:
 *       cls = self.decode_type(stream)
 *       return cls(self.decode_from_stream(stream, True))             # <<<<<<<<<<<<<<
 *     elif t == NESTED_STATE_TYPE:
 *       cls = self.decode_type(stream)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_cls);
    __pyx_t_2 = __pyx_v_cls; __pyx_t_7 = NULL;
    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_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":574
 *       cls = self.decode_type(stream)
 *       return cls(*self.iterable_coder_impl.decode_from_stream(stream, True))
 *     elif t == ENUM_TYPE:             # <<<<<<<<<<<<<<
 *       cls = self.decode_type(stream)
 *       return cls(self.decode_from_stream(stream, True))
 */
  }

  /* "apache_beam/coders/coder_impl.py":577
 *       cls = self.decode_type(stream)
 *       return cls(self.decode_from_stream(stream, True))
 *     elif t == NESTED_STATE_TYPE:             # <<<<<<<<<<<<<<
 *       cls = self.decode_type(stream)
 *       state = self.decode_from_stream(stream, True)
 */
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NESTED_STATE_TYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":578
 *       return cls(self.decode_from_stream(stream, True))
 *     elif t == NESTED_STATE_TYPE:
 *       cls = self.decode_type(stream)             # <<<<<<<<<<<<<<
 *       state = self.decode_from_stream(stream, True)
 *       value = cls.__new__(cls)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->decode_type(__pyx_v_self, __pyx_v_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_cls = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":579
 *     elif t == NESTED_STATE_TYPE:
 *       cls = self.decode_type(stream)
 *       state = self.decode_from_stream(stream, True)             # <<<<<<<<<<<<<<
 *       value = cls.__new__(cls)
 *       value.__setstate__(state)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_state = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":580
 *       cls = self.decode_type(stream)
 *       state = self.decode_from_stream(stream, True)
 *       value = cls.__new__(cls)             # <<<<<<<<<<<<<<
 *       value.__setstate__(state)
 *       return value
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_cls) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cls);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_value = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":581
 *       state = self.decode_from_stream(stream, True)
 *       value = cls.__new__(cls)
 *       value.__setstate__(state)             # <<<<<<<<<<<<<<
 *       return value
 *     elif t == UNKNOWN_TYPE:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_setstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_state) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_state);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":582
 *       value = cls.__new__(cls)
 *       value.__setstate__(state)
 *       return value             # <<<<<<<<<<<<<<
 *     elif t == UNKNOWN_TYPE:
 *       return self.fallback_coder_impl.decode_from_stream(stream, nested)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_value);
    __pyx_r = __pyx_v_value;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":577
 *       cls = self.decode_type(stream)
 *       return cls(self.decode_from_stream(stream, True))
 *     elif t == NESTED_STATE_TYPE:             # <<<<<<<<<<<<<<
 *       cls = self.decode_type(stream)
 *       state = self.decode_from_stream(stream, True)
 */
  }

  /* "apache_beam/coders/coder_impl.py":583
 *       value.__setstate__(state)
 *       return value
 *     elif t == UNKNOWN_TYPE:             # <<<<<<<<<<<<<<
 *       return self.fallback_coder_impl.decode_from_stream(stream, nested)
 *     else:
 */
  __pyx_t_9 = ((__pyx_v_t == __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE) != 0);
  if (likely(__pyx_t_9)) {

    /* "apache_beam/coders/coder_impl.py":584
 *       return value
 *     elif t == UNKNOWN_TYPE:
 *       return self.fallback_coder_impl.decode_from_stream(stream, nested)             # <<<<<<<<<<<<<<
 *     else:
 *       raise ValueError('Unknown type tag %x' % t)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->fallback_coder_impl->__pyx_vtab)->decode_from_stream(__pyx_v_self->fallback_coder_impl, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":583
 *       value.__setstate__(state)
 *       return value
 *     elif t == UNKNOWN_TYPE:             # <<<<<<<<<<<<<<
 *       return self.fallback_coder_impl.decode_from_stream(stream, nested)
 *     else:
 */
  }

  /* "apache_beam/coders/coder_impl.py":586
 *       return self.fallback_coder_impl.decode_from_stream(stream, nested)
 *     else:
 *       raise ValueError('Unknown type tag %x' % t)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_Unknown_type_tag_x, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 586, __pyx_L1_error)
  }

  /* "apache_beam/coders/coder_impl.py":534
 *     return _unpickle_type(stream.read_all(True))
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     t = stream.read_byte()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_vlist);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_cls);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_nested,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_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 534, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 534, __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_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 534, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 534, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_10decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_10decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_12__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.fallback_coder_impl, self.iterable_coder_impl, self.requires_deterministic_step_label, self.warn_deterministic_fallback)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->warn_deterministic_fallback); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->fallback_coder_impl));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->fallback_coder_impl));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->fallback_coder_impl));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->iterable_coder_impl));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->iterable_coder_impl));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->iterable_coder_impl));
  __Pyx_INCREF(__pyx_v_self->requires_deterministic_step_label);
  __Pyx_GIVEREF(__pyx_v_self->requires_deterministic_step_label);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->requires_deterministic_step_label);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.fallback_coder_impl, self.iterable_coder_impl, self.requires_deterministic_step_label, self.warn_deterministic_fallback)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self.fallback_coder_impl, self.iterable_coder_impl, self.requires_deterministic_step_label, self.warn_deterministic_fallback)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.fallback_coder_impl, self.iterable_coder_impl, self.requires_deterministic_step_label, self.warn_deterministic_fallback)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->fallback_coder_impl) != 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->iterable_coder_impl) != 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->requires_deterministic_step_label != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None
 *     if use_setstate:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_FastPrimitivesCod); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_36447268);
    __Pyx_GIVEREF(__pyx_int_36447268);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_36447268);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.fallback_coder_impl is not None or self.iterable_coder_impl is not None or self.requires_deterministic_step_label is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, None), state
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_FastPrimitivesCod); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_36447268);
    __Pyx_GIVEREF(__pyx_int_36447268);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_36447268);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_14__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FastPrimitivesCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":592
 * 
 * 
 * def _unpickle_type(bs):             # <<<<<<<<<<<<<<
 *   t = _unpickled_types.get(bs, None)
 *   if t is None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_1_unpickle_type(PyObject *__pyx_self, PyObject *__pyx_v_bs); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_1_unpickle_type = {"_unpickle_type", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_1_unpickle_type, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_1_unpickle_type(PyObject *__pyx_self, PyObject *__pyx_v_bs) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_unpickle_type (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl__unpickle_type(__pyx_self, ((PyObject *)__pyx_v_bs));

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

/* "apache_beam/coders/coder_impl.py":601
 *         pickle.loads(pickle.dumps(t))
 *       except pickle.PicklingError:
 *         t.__reduce__ = lambda self: (_unpickle_named_tuple, (bs, tuple(self)))             # <<<<<<<<<<<<<<
 *   return t
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14_unpickle_type_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14_unpickle_type_lambda2 = {"lambda2", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14_unpickle_type_lambda2, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14_unpickle_type_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_lambda_funcdef_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *__pyx_cur_scope;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda2", 0);
  __pyx_outer_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unpickle_named_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_bs)) { __Pyx_RaiseClosureNameError("bs"); __PYX_ERR(0, 601, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bs);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_bs);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":592
 * 
 * 
 * def _unpickle_type(bs):             # <<<<<<<<<<<<<<
 *   t = _unpickled_types.get(bs, None)
 *   if t is None:
 */

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl__unpickle_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *__pyx_cur_scope;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unpickle_type", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type(__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 592, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_bs = __pyx_v_bs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bs);

  /* "apache_beam/coders/coder_impl.py":593
 * 
 * def _unpickle_type(bs):
 *   t = _unpickled_types.get(bs, None)             # <<<<<<<<<<<<<<
 *   if t is None:
 *     t = _unpickled_types[bs] = dill.loads(bs)
 */
  if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 593, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, __pyx_cur_scope->__pyx_v_bs, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_t = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":594
 * def _unpickle_type(bs):
 *   t = _unpickled_types.get(bs, None)
 *   if t is None:             # <<<<<<<<<<<<<<
 *     t = _unpickled_types[bs] = dill.loads(bs)
 *     # Fix unpicklable anonymous named tuples for Python 3.6.
 */
  __pyx_t_2 = (__pyx_v_t == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "apache_beam/coders/coder_impl.py":595
 *   t = _unpickled_types.get(bs, None)
 *   if t is None:
 *     t = _unpickled_types[bs] = dill.loads(bs)             # <<<<<<<<<<<<<<
 *     # Fix unpicklable anonymous named tuples for Python 3.6.
 *     if t.__base__ is tuple and hasattr(t, '_fields'):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_dill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_loads); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_cur_scope->__pyx_v_bs) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_bs);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_t, __pyx_t_1);
    if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 595, __pyx_L1_error)
    }
    if (unlikely(PyDict_SetItem(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, __pyx_cur_scope->__pyx_v_bs, __pyx_t_1) < 0)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":597
 *     t = _unpickled_types[bs] = dill.loads(bs)
 *     # Fix unpicklable anonymous named tuples for Python 3.6.
 *     if t.__base__ is tuple and hasattr(t, '_fields'):             # <<<<<<<<<<<<<<
 *       try:
 *         pickle.loads(pickle.dumps(t))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = (__pyx_t_1 == ((PyObject *)(&PyTuple_Type)));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (__pyx_t_2 != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_3 = __pyx_t_6;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_HasAttr(__pyx_v_t, __pyx_n_u_fields_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 597, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_6 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_3) {

      /* "apache_beam/coders/coder_impl.py":598
 *     # Fix unpicklable anonymous named tuples for Python 3.6.
 *     if t.__base__ is tuple and hasattr(t, '_fields'):
 *       try:             # <<<<<<<<<<<<<<
 *         pickle.loads(pickle.dumps(t))
 *       except pickle.PicklingError:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {

          /* "apache_beam/coders/coder_impl.py":599
 *     if t.__base__ is tuple and hasattr(t, '_fields'):
 *       try:
 *         pickle.loads(pickle.dumps(t))             # <<<<<<<<<<<<<<
 *       except pickle.PicklingError:
 *         t.__reduce__ = lambda self: (_unpickle_named_tuple, (bs, tuple(self)))
 */
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pickle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_loads); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pickle); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 599, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_dumps); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 599, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
            }
          }
          __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, __pyx_v_t) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_t);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "apache_beam/coders/coder_impl.py":598
 *     # Fix unpicklable anonymous named tuples for Python 3.6.
 *     if t.__base__ is tuple and hasattr(t, '_fields'):
 *       try:             # <<<<<<<<<<<<<<
 *         pickle.loads(pickle.dumps(t))
 *       except pickle.PicklingError:
 */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "apache_beam/coders/coder_impl.py":600
 *       try:
 *         pickle.loads(pickle.dumps(t))
 *       except pickle.PicklingError:             # <<<<<<<<<<<<<<
 *         t.__reduce__ = lambda self: (_unpickle_named_tuple, (bs, tuple(self)))
 *   return t
 */
        __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5);
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_pickle); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 600, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_PicklingError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 600, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_12 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_10);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_ErrRestore(__pyx_t_1, __pyx_t_4, __pyx_t_5);
        __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0;
        if (__pyx_t_12) {
          __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 600, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_1);

          /* "apache_beam/coders/coder_impl.py":601
 *         pickle.loads(pickle.dumps(t))
 *       except pickle.PicklingError:
 *         t.__reduce__ = lambda self: (_unpickle_named_tuple, (bs, tuple(self)))             # <<<<<<<<<<<<<<
 *   return t
 * 
 */
          __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14_unpickle_type_lambda2, 0, __pyx_n_s_unpickle_type_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 601, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (__Pyx_PyObject_SetAttrStr(__pyx_v_t, __pyx_n_s_reduce, __pyx_t_10) < 0) __PYX_ERR(0, 601, __pyx_L9_except_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L8_exception_handled;
        }
        goto __pyx_L9_except_error;
        __pyx_L9_except_error:;

        /* "apache_beam/coders/coder_impl.py":598
 *     # Fix unpicklable anonymous named tuples for Python 3.6.
 *     if t.__base__ is tuple and hasattr(t, '_fields'):
 *       try:             # <<<<<<<<<<<<<<
 *         pickle.loads(pickle.dumps(t))
 *       except pickle.PicklingError:
 */
        __Pyx_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:;
      }

      /* "apache_beam/coders/coder_impl.py":597
 *     t = _unpickled_types[bs] = dill.loads(bs)
 *     # Fix unpicklable anonymous named tuples for Python 3.6.
 *     if t.__base__ is tuple and hasattr(t, '_fields'):             # <<<<<<<<<<<<<<
 *       try:
 *         pickle.loads(pickle.dumps(t))
 */
    }

    /* "apache_beam/coders/coder_impl.py":594
 * def _unpickle_type(bs):
 *   t = _unpickled_types.get(bs, None)
 *   if t is None:             # <<<<<<<<<<<<<<
 *     t = _unpickled_types[bs] = dill.loads(bs)
 *     # Fix unpicklable anonymous named tuples for Python 3.6.
 */
  }

  /* "apache_beam/coders/coder_impl.py":602
 *       except pickle.PicklingError:
 *         t.__reduce__ = lambda self: (_unpickle_named_tuple, (bs, tuple(self)))
 *   return t             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_t);
  __pyx_r = __pyx_v_t;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":592
 * 
 * 
 * def _unpickle_type(bs):             # <<<<<<<<<<<<<<
 *   t = _unpickled_types.get(bs, None)
 *   if t is None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":605
 * 
 * 
 * def _unpickle_named_tuple(bs, items):             # <<<<<<<<<<<<<<
 *   return _unpickle_type(bs)(*items)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_3_unpickle_named_tuple(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_3_unpickle_named_tuple = {"_unpickle_named_tuple", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_3_unpickle_named_tuple, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_3_unpickle_named_tuple(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_bs = 0;
  PyObject *__pyx_v_items = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_unpickle_named_tuple (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bs,&__pyx_n_s_items,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_bs)) != 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_items)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_unpickle_named_tuple", 1, 2, 2, 1); __PYX_ERR(0, 605, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_unpickle_named_tuple") < 0)) __PYX_ERR(0, 605, __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_bs = values[0];
    __pyx_v_items = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_unpickle_named_tuple", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 605, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_named_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_2_unpickle_named_tuple(__pyx_self, __pyx_v_bs, __pyx_v_items);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_2_unpickle_named_tuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_bs, PyObject *__pyx_v_items) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unpickle_named_tuple", 0);

  /* "apache_beam/coders/coder_impl.py":606
 * 
 * def _unpickle_named_tuple(bs, items):
 *   return _unpickle_type(bs)(*items)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_unpickle_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_bs) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_bs);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  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_2 = __Pyx_PySequence_Tuple(__pyx_v_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":605
 * 
 * 
 * def _unpickle_named_tuple(bs, items):             # <<<<<<<<<<<<<<
 *   return _unpickle_type(bs)(*items)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._unpickle_named_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":613
 * 
 *   A coder for bytes/str objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (bytes, create_OutputStream, bool) -> None
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_INCREF(__pyx_v_value);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 613, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 613, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 613, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":618
 *     # value might be of type np.bytes if passed from encode_batch, and cython
 *     # does not recognize it as bytes.
 *     if is_compiled and isinstance(value, np.bytes_):             # <<<<<<<<<<<<<<
 *       value = bytes(value)
 * 
 */
  __pyx_t_9 = (__pyx_v_11apache_beam_6coders_10coder_impl_is_compiled != 0);
  if (__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L4_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_bytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_10 = (__pyx_t_9 != 0);
  __pyx_t_8 = __pyx_t_10;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":619
 *     # does not recognize it as bytes.
 *     if is_compiled and isinstance(value, np.bytes_):
 *       value = bytes(value)             # <<<<<<<<<<<<<<
 * 
 *     out.write(value, nested)
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":618
 *     # value might be of type np.bytes if passed from encode_batch, and cython
 *     # does not recognize it as bytes.
 *     if is_compiled and isinstance(value, np.bytes_):             # <<<<<<<<<<<<<<
 *       value = bytes(value)
 * 
 */
  }

  /* "apache_beam/coders/coder_impl.py":621
 *       value = bytes(value)
 * 
 *     out.write(value, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 621, __pyx_L1_error)
  __pyx_t_11.__pyx_n = 1;
  __pyx_t_11.nested = __pyx_v_nested;
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_v_value), 0, &__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":613
 * 
 *   A coder for bytes/str objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (bytes, create_OutputStream, bool) -> None
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 613, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 613, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 613, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 613, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 613, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":623
 *     out.write(value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> bytes
 *     return in_stream.read_all(nested)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __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_in_stream), __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, 623, __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_in_stream), __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, 623, __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, 623, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 623, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":625
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> bytes
 *     return in_stream.read_all(nested)             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.nested = __pyx_v_nested;
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_all(__pyx_v_in_stream, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":623
 *     out.write(value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> bytes
 *     return in_stream.read_all(nested)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 623, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 623, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 623, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 623, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":627
 *     return in_stream.read_all(nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert isinstance(value, bytes), (value, type(value))
 *     return value
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 627, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":628
 * 
 *   def encode(self, value):
 *     assert isinstance(value, bytes), (value, type(value))             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_5 = PyBytes_Check(__pyx_v_value); 
    if (unlikely(!(__pyx_t_5 != 0))) {
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_value)));
      PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_TYPE(__pyx_v_value)));
      __pyx_t_2 = PyTuple_Pack(1, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 628, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/coders/coder_impl.py":629
 *   def encode(self, value):
 *     assert isinstance(value, bytes), (value, type(value))
 *     return value             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_value);
  __pyx_r = ((PyObject*)__pyx_v_value);
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":627
 *     return in_stream.read_all(nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert isinstance(value, bytes), (value, type(value))
 *     return value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode = {"encode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_4encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":631
 *     return value
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return encoded
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":632
 * 
 *   def decode(self, encoded):
 *     return encoded             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_encoded);
  __pyx_r = __pyx_v_encoded;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":631
 *     return value
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return encoded
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode = {"decode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 631, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_6decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), ((PyObject*)__pyx_v_encoded));

  /* 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_6coders_10coder_impl_14BytesCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_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_6coders_10coder_impl_14BytesCoderImpl_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BytesCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_BytesCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_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_6coders_10coder_impl_14BytesCoderImpl_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BytesCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":639
 * 
 *   A coder for bool objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_byte(1 if value else 0)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  unsigned char __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 639, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 639, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 639, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 639, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":640
 *   A coder for bool objects."""
 *   def encode_to_stream(self, value, out, nested):
 *     out.write_byte(1 if value else 0)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 640, __pyx_L1_error)
  if (__pyx_t_9) {
    __pyx_t_8 = 1;
  } else {
    __pyx_t_8 = 0;
  }
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":639
 * 
 *   A coder for bool objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_byte(1 if value else 0)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 639, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 639, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 639, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 639, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 639, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":642
 *     out.write_byte(1 if value else 0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value = in_stream.read_byte()
 *     if value == 0:
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  long __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __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_in_stream), __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, 642, __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_in_stream), __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, 642, __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, 642, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 642, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":643
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     value = in_stream.read_byte()             # <<<<<<<<<<<<<<
 *     if value == 0:
 *       return False
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_byte(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 643, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":644
 *   def decode_from_stream(self, in_stream, nested):
 *     value = in_stream.read_byte()
 *     if value == 0:             # <<<<<<<<<<<<<<
 *       return False
 *     elif value == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_value, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 644, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":645
 *     value = in_stream.read_byte()
 *     if value == 0:
 *       return False             # <<<<<<<<<<<<<<
 *     elif value == 1:
 *       return True
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":644
 *   def decode_from_stream(self, in_stream, nested):
 *     value = in_stream.read_byte()
 *     if value == 0:             # <<<<<<<<<<<<<<
 *       return False
 *     elif value == 1:
 */
  }

  /* "apache_beam/coders/coder_impl.py":646
 *     if value == 0:
 *       return False
 *     elif value == 1:             # <<<<<<<<<<<<<<
 *       return True
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_value, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":647
 *       return False
 *     elif value == 1:
 *       return True             # <<<<<<<<<<<<<<
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":646
 *     if value == 0:
 *       return False
 *     elif value == 1:             # <<<<<<<<<<<<<<
 *       return True
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 */
  }

  /* "apache_beam/coders/coder_impl.py":648
 *     elif value == 1:
 *       return True
 *     raise ValueError("Expected 0 or 1, got %s" % value)             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Expected_0_or_1_got_s, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 648, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":642
 *     out.write_byte(1 if value else 0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value = in_stream.read_byte()
 *     if value == 0:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 642, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 642, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 642, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 642, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":650
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return b'\x01' if value else b'\x00'
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 650, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":651
 * 
 *   def encode(self, value):
 *     return b'\x01' if value else b'\x00'             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 651, __pyx_L1_error)
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_kp_b__4);
    __pyx_t_1 = __pyx_kp_b__4;
  } else {
    __Pyx_INCREF(__pyx_kp_b__5);
    __pyx_t_1 = __pyx_kp_b__5;
  }
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":650
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return b'\x01' if value else b'\x00'
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode = {"encode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_4encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":653
 *     return b'\x01' if value else b'\x00'
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     value = ord(encoded)
 *     if value == 0:
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":654
 * 
 *   def decode(self, encoded):
 *     value = ord(encoded)             # <<<<<<<<<<<<<<
 *     if value == 0:
 *       return False
 */
  __pyx_t_5 = __Pyx_PyObject_Ord(__pyx_v_encoded); if (unlikely(__pyx_t_5 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 654, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":655
 *   def decode(self, encoded):
 *     value = ord(encoded)
 *     if value == 0:             # <<<<<<<<<<<<<<
 *       return False
 *     elif value == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_value, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "apache_beam/coders/coder_impl.py":656
 *     value = ord(encoded)
 *     if value == 0:
 *       return False             # <<<<<<<<<<<<<<
 *     elif value == 1:
 *       return True
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":655
 *   def decode(self, encoded):
 *     value = ord(encoded)
 *     if value == 0:             # <<<<<<<<<<<<<<
 *       return False
 *     elif value == 1:
 */
  }

  /* "apache_beam/coders/coder_impl.py":657
 *     if value == 0:
 *       return False
 *     elif value == 1:             # <<<<<<<<<<<<<<
 *       return True
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_value, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "apache_beam/coders/coder_impl.py":658
 *       return False
 *     elif value == 1:
 *       return True             # <<<<<<<<<<<<<<
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":657
 *     if value == 0:
 *       return False
 *     elif value == 1:             # <<<<<<<<<<<<<<
 *       return True
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 */
  }

  /* "apache_beam/coders/coder_impl.py":659
 *     elif value == 1:
 *       return True
 *     raise ValueError("Expected 0 or 1, got %s" % value)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, unused_value, nested=False):
 */
  __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Expected_0_or_1_got_s, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_ERR(0, 659, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":653
 *     return b'\x01' if value else b'\x00'
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     value = ord(encoded)
 *     if value == 0:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode = {"decode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 653, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_6decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), ((PyObject*)__pyx_v_encoded));

  /* 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_6coders_10coder_impl_16BooleanCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":661
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that booleans are encoded the same way regardless of nesting.
 *     return 1
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __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, __pyx_v_unused_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, 661, __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, __pyx_v_unused_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, 661, __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, 661, __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_unused_value);
          __Pyx_GIVEREF(__pyx_v_unused_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_unused_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, 661, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":663
 *   def estimate_size(self, unused_value, nested=False):
 *     # Note that booleans are encoded the same way regardless of nesting.
 *     return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_1);
  __pyx_r = __pyx_int_1;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":661
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that booleans are encoded the same way regardless of nesting.
 *     return 1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_unused_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unused_value,&__pyx_n_s_nested,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_unused_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 661, __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_unused_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 661, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 661, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_8estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_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_6coders_10coder_impl_16BooleanCoderImpl_10__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BooleanCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_BooleanCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_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_6coders_10coder_impl_16BooleanCoderImpl_12__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BooleanCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":678
 * 
 *   A coder for typing.Mapping objects."""
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       key_coder,  # type: CoderImpl
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key_coder = 0;
  PyObject *__pyx_v_value_coder = 0;
  PyObject *__pyx_v_is_deterministic = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key_coder,&__pyx_n_s_value_coder,&__pyx_n_s_is_deterministic,0};
    PyObject* values[3] = {0,0,0};

    /* "apache_beam/coders/coder_impl.py":682
 *       key_coder,  # type: CoderImpl
 *       value_coder,  # type: CoderImpl
 *       is_deterministic = False             # <<<<<<<<<<<<<<
 *   ):
 *     self._key_coder = key_coder
 */
    values[2] = ((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  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_key_coder)) != 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_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 678, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_is_deterministic);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 678, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_key_coder = values[0];
    __pyx_v_value_coder = values[1];
    __pyx_v_is_deterministic = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 678, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), __pyx_v_key_coder, __pyx_v_value_coder, __pyx_v_is_deterministic);

  /* "apache_beam/coders/coder_impl.py":678
 * 
 *   A coder for typing.Mapping objects."""
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       key_coder,  # type: CoderImpl
 */

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_key_coder, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_is_deterministic) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":684
 *       is_deterministic = False
 *   ):
 *     self._key_coder = key_coder             # <<<<<<<<<<<<<<
 *     self._value_coder = value_coder
 *     self._is_deterministic = is_deterministic
 */
  if (!(likely(((__pyx_v_key_coder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_key_coder, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 684, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_key_coder;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_key_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_key_coder));
  __pyx_v_self->_key_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":685
 *   ):
 *     self._key_coder = key_coder
 *     self._value_coder = value_coder             # <<<<<<<<<<<<<<
 *     self._is_deterministic = is_deterministic
 * 
 */
  if (!(likely(((__pyx_v_value_coder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value_coder, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 685, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value_coder;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_value_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_value_coder));
  __pyx_v_self->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":686
 *     self._key_coder = key_coder
 *     self._value_coder = value_coder
 *     self._is_deterministic = is_deterministic             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, dict_value, out, nested):
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_is_deterministic); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_v_self->_is_deterministic = __pyx_t_2;

  /* "apache_beam/coders/coder_impl.py":678
 * 
 *   A coder for typing.Mapping objects."""
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       key_coder,  # type: CoderImpl
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":688
 *     self._is_deterministic = is_deterministic
 * 
 *   def encode_to_stream(self, dict_value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_bigendian_int32(len(dict_value))
 *     # Note this implementation always uses nested context when encoding keys
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_dict_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __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[4] = {__pyx_t_5, __pyx_v_dict_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 688, __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[4] = {__pyx_t_5, __pyx_v_dict_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 688, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 688, __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_dict_value);
          __Pyx_GIVEREF(__pyx_v_dict_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_dict_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 688, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":689
 * 
 *   def encode_to_stream(self, dict_value, out, nested):
 *     out.write_bigendian_int32(len(dict_value))             # <<<<<<<<<<<<<<
 *     # Note this implementation always uses nested context when encoding keys
 *     # and values which differs from Java. See note in docstring.
 */
  __pyx_t_8 = PyObject_Length(__pyx_v_dict_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 689, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int32(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":692
 *     # Note this implementation always uses nested context when encoding keys
 *     # and values which differs from Java. See note in docstring.
 *     if self._is_deterministic:             # <<<<<<<<<<<<<<
 *       for key, value in sorted(dict_value.items()):
 *         self._key_coder.encode_to_stream(key, out, True)
 */
  __pyx_t_9 = (__pyx_v_self->_is_deterministic != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":693
 *     # and values which differs from Java. See note in docstring.
 *     if self._is_deterministic:
 *       for key, value in sorted(dict_value.items()):             # <<<<<<<<<<<<<<
 *         self._key_coder.encode_to_stream(key, out, True)
 *         self._value_coder.encode_to_stream(value, out, True)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_dict_value, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_10 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 693, __pyx_L1_error)
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 693, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 693, __pyx_L1_error)
      #else
      __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      #endif
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 693, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 693, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_3), 2) < 0) __PYX_ERR(0, 693, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L7_unpacking_done;
        __pyx_L6_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 693, __pyx_L1_error)
        __pyx_L7_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":694
 *     if self._is_deterministic:
 *       for key, value in sorted(dict_value.items()):
 *         self._key_coder.encode_to_stream(key, out, True)             # <<<<<<<<<<<<<<
 *         self._value_coder.encode_to_stream(value, out, True)
 *     else:
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_key_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_key_coder, __pyx_v_key, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":695
 *       for key, value in sorted(dict_value.items()):
 *         self._key_coder.encode_to_stream(key, out, True)
 *         self._value_coder.encode_to_stream(value, out, True)             # <<<<<<<<<<<<<<
 *     else:
 *       # This loop is separate from the above so the loop over dict.items()
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_value_coder, __pyx_v_value, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":693
 *     # and values which differs from Java. See note in docstring.
 *     if self._is_deterministic:
 *       for key, value in sorted(dict_value.items()):             # <<<<<<<<<<<<<<
 *         self._key_coder.encode_to_stream(key, out, True)
 *         self._value_coder.encode_to_stream(value, out, True)
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":692
 *     # Note this implementation always uses nested context when encoding keys
 *     # and values which differs from Java. See note in docstring.
 *     if self._is_deterministic:             # <<<<<<<<<<<<<<
 *       for key, value in sorted(dict_value.items()):
 *         self._key_coder.encode_to_stream(key, out, True)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":699
 *       # This loop is separate from the above so the loop over dict.items()
 *       # will be optimized by Cython.
 *       for key, value in dict_value.items():             # <<<<<<<<<<<<<<
 *         self._key_coder.encode_to_stream(key, out, True)
 *         self._value_coder.encode_to_stream(value, out, True)
 */
  /*else*/ {
    __pyx_t_8 = 0;
    if (unlikely(__pyx_v_dict_value == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 699, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_dict_value, 0, __pyx_n_s_items, (&__pyx_t_12), (&__pyx_t_6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_4);
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
    while (1) {
      __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_12, &__pyx_t_8, &__pyx_t_1, &__pyx_t_7, NULL, __pyx_t_6);
      if (unlikely(__pyx_t_13 == 0)) break;
      if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 699, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":700
 *       # will be optimized by Cython.
 *       for key, value in dict_value.items():
 *         self._key_coder.encode_to_stream(key, out, True)             # <<<<<<<<<<<<<<
 *         self._value_coder.encode_to_stream(value, out, True)
 * 
 */
      __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_key_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_key_coder, __pyx_v_key, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":701
 *       for key, value in dict_value.items():
 *         self._key_coder.encode_to_stream(key, out, True)
 *         self._value_coder.encode_to_stream(value, out, True)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
      __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_value_coder, __pyx_v_value, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":688
 *     self._is_deterministic = is_deterministic
 * 
 *   def encode_to_stream(self, dict_value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_bigendian_int32(len(dict_value))
 *     # Note this implementation always uses nested context when encoding keys
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dict_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dict_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_dict_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 688, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 688, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 688, __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_dict_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 688, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 688, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 688, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), __pyx_v_dict_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_dict_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_dict_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":703
 *         self._value_coder.encode_to_stream(value, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     size = in_stream.read_bigendian_int32()
 *     result = {}
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  int32_t __pyx_v_size;
  PyObject *__pyx_v_result = NULL;
  CYTHON_UNUSED int32_t __pyx_v__;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int32_t __pyx_t_8;
  int32_t __pyx_t_9;
  int32_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __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_in_stream), __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, 703, __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_in_stream), __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, 703, __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, 703, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 703, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":704
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     size = in_stream.read_bigendian_int32()             # <<<<<<<<<<<<<<
 *     result = {}
 *     for _ in range(size):
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_int32(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L1_error)
  __pyx_v_size = __pyx_t_8;

  /* "apache_beam/coders/coder_impl.py":705
 *   def decode_from_stream(self, in_stream, nested):
 *     size = in_stream.read_bigendian_int32()
 *     result = {}             # <<<<<<<<<<<<<<
 *     for _ in range(size):
 *       # Note this implementation always uses nested context when encoding keys
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":706
 *     size = in_stream.read_bigendian_int32()
 *     result = {}
 *     for _ in range(size):             # <<<<<<<<<<<<<<
 *       # Note this implementation always uses nested context when encoding keys
 *       # and values which differs from Java. See note in docstring.
 */
  __pyx_t_8 = __pyx_v_size;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v__ = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":709
 *       # Note this implementation always uses nested context when encoding keys
 *       # and values which differs from Java. See note in docstring.
 *       key = self._key_coder.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *       value = self._value_coder.decode_from_stream(in_stream, True)
 *       result[key] = value
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_key_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_key_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":710
 *       # and values which differs from Java. See note in docstring.
 *       key = self._key_coder.decode_from_stream(in_stream, True)
 *       value = self._value_coder.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *       result[key] = value
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_value_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":711
 *       key = self._key_coder.decode_from_stream(in_stream, True)
 *       value = self._value_coder.decode_from_stream(in_stream, True)
 *       result[key] = value             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    if (unlikely(PyDict_SetItem(__pyx_v_result, __pyx_v_key, __pyx_v_value) < 0)) __PYX_ERR(0, 711, __pyx_L1_error)
  }

  /* "apache_beam/coders/coder_impl.py":713
 *       result[key] = value
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, unused_value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":703
 *         self._value_coder.encode_to_stream(value, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     size = in_stream.read_bigendian_int32()
 *     result = {}
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 703, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 703, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 703, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 703, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 703, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":715
 *     return result
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     estimate = 4  # 4 bytes for int32 size prefix
 *     for key, value in unused_value.items():
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_estimate = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 715, __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, __pyx_v_unused_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, 715, __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, __pyx_v_unused_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, 715, __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, 715, __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_unused_value);
          __Pyx_GIVEREF(__pyx_v_unused_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_unused_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, 715, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":716
 * 
 *   def estimate_size(self, unused_value, nested=False):
 *     estimate = 4  # 4 bytes for int32 size prefix             # <<<<<<<<<<<<<<
 *     for key, value in unused_value.items():
 *       estimate += self._key_coder.estimate_size(key, True)
 */
  __Pyx_INCREF(__pyx_int_4);
  __pyx_v_estimate = __pyx_int_4;

  /* "apache_beam/coders/coder_impl.py":717
 *   def estimate_size(self, unused_value, nested=False):
 *     estimate = 4  # 4 bytes for int32 size prefix
 *     for key, value in unused_value.items():             # <<<<<<<<<<<<<<
 *       estimate += self._key_coder.estimate_size(key, True)
 *       estimate += self._value_coder.estimate_size(value, True)
 */
  __pyx_t_8 = 0;
  if (unlikely(__pyx_v_unused_value == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 717, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_unused_value, 0, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_8, &__pyx_t_2, &__pyx_t_4, NULL, __pyx_t_6);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":718
 *     estimate = 4  # 4 bytes for int32 size prefix
 *     for key, value in unused_value.items():
 *       estimate += self._key_coder.estimate_size(key, True)             # <<<<<<<<<<<<<<
 *       estimate += self._value_coder.estimate_size(value, True)
 *     return estimate
 */
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.nested = 1;
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_key_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_key_coder, __pyx_v_key, 0, &__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_estimate, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_estimate, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":719
 *     for key, value in unused_value.items():
 *       estimate += self._key_coder.estimate_size(key, True)
 *       estimate += self._value_coder.estimate_size(value, True)             # <<<<<<<<<<<<<<
 *     return estimate
 * 
 */
    __pyx_t_11.__pyx_n = 1;
    __pyx_t_11.nested = 1;
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_value_coder, __pyx_v_value, 0, &__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_estimate, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_estimate, __pyx_t_4);
    __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":720
 *       estimate += self._key_coder.estimate_size(key, True)
 *       estimate += self._value_coder.estimate_size(value, True)
 *     return estimate             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_estimate);
  __pyx_r = __pyx_v_estimate;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":715
 *     return result
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     estimate = 4  # 4 bytes for int32 size prefix
 *     for key, value in unused_value.items():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_estimate);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_unused_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unused_value,&__pyx_n_s_nested,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_unused_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 715, __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_unused_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 715, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_6estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_6estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_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_6coders_10coder_impl_12MapCoderImpl_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._is_deterministic, self._key_coder, self._value_coder)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_deterministic); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_key_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_key_coder));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_key_coder));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_value_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_value_coder));
  PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_self->_value_coder));
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._is_deterministic, self._key_coder, self._value_coder)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._is_deterministic, self._key_coder, self._value_coder)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._key_coder is not None or self._value_coder is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._is_deterministic, self._key_coder, self._value_coder)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._key_coder is not None or self._value_coder is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->_key_coder) != 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->_value_coder) != 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)":12
 *     else:
 *         use_setstate = self._key_coder is not None or self._value_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._key_coder is not None or self._value_coder is not None
 *     if use_setstate:
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_MapCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_772173);
    __Pyx_GIVEREF(__pyx_int_772173);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_772173);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._key_coder is not None or self._value_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, None), state
 *     else:
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_MapCoderImpl); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_772173);
    __Pyx_GIVEREF(__pyx_int_772173);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_772173);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_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_6coders_10coder_impl_12MapCoderImpl_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12MapCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.MapCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":731
 *   ENCODE_PRESENT = 1
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       value_coder  # type: CoderImpl
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value_coder = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value_coder,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_value_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 731, __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, 731, __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_value_coder = 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, 731, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_value_coder);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value_coder) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":735
 *       value_coder  # type: CoderImpl
 *   ):
 *     self._value_coder = value_coder             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value_coder_2, __pyx_v_value_coder) < 0) __PYX_ERR(0, 735, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":731
 *   ENCODE_PRESENT = 1
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       value_coder  # type: CoderImpl
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":737
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     if value is None:
 *       out.write_byte(self.ENCODE_NULL)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 1); __PYX_ERR(0, 737, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 2); __PYX_ERR(0, 737, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 3); __PYX_ERR(0, 737, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 737, __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_self = values[0];
    __pyx_v_value = values[1];
    __pyx_v_out = values[2];
    __pyx_v_nested = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 737, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_2encode_to_stream(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, PyObject *__pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);

  /* "apache_beam/coders/coder_impl.py":738
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     if value is None:             # <<<<<<<<<<<<<<
 *       out.write_byte(self.ENCODE_NULL)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "apache_beam/coders/coder_impl.py":739
 *   def encode_to_stream(self, value, out, nested):
 *     if value is None:
 *       out.write_byte(self.ENCODE_NULL)             # <<<<<<<<<<<<<<
 *     else:
 *       out.write_byte(self.ENCODE_PRESENT)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_write_byte); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ENCODE_NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":738
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     if value is None:             # <<<<<<<<<<<<<<
 *       out.write_byte(self.ENCODE_NULL)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":741
 *       out.write_byte(self.ENCODE_NULL)
 *     else:
 *       out.write_byte(self.ENCODE_PRESENT)             # <<<<<<<<<<<<<<
 *       self._value_coder.encode_to_stream(value, out, nested)
 * 
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_write_byte); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ENCODE_PRESENT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":742
 *     else:
 *       out.write_byte(self.ENCODE_PRESENT)
 *       self._value_coder.encode_to_stream(value, out, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value_coder_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_value, __pyx_v_out, __pyx_v_nested};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __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_5)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_value, __pyx_v_out, __pyx_v_nested};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 742, __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_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_value);
      __Pyx_INCREF(__pyx_v_out);
      __Pyx_GIVEREF(__pyx_v_out);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_out);
      __Pyx_INCREF(__pyx_v_nested);
      __Pyx_GIVEREF(__pyx_v_nested);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_v_nested);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":737
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     if value is None:
 *       out.write_byte(self.ENCODE_NULL)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":744
 *       self._value_coder.encode_to_stream(value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     null_indicator = in_stream.read_byte()
 *     if null_indicator == self.ENCODE_NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_in_stream = 0;
  PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, 1); __PYX_ERR(0, 744, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, 2); __PYX_ERR(0, 744, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 744, __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_in_stream = values[1];
    __pyx_v_nested = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 744, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_4decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, PyObject *__pyx_v_nested) {
  PyObject *__pyx_v_null_indicator = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);

  /* "apache_beam/coders/coder_impl.py":745
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     null_indicator = in_stream.read_byte()             # <<<<<<<<<<<<<<
 *     if null_indicator == self.ENCODE_NULL:
 *       return None
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_stream, __pyx_n_s_read_byte); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_null_indicator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":746
 *   def decode_from_stream(self, in_stream, nested):
 *     null_indicator = in_stream.read_byte()
 *     if null_indicator == self.ENCODE_NULL:             # <<<<<<<<<<<<<<
 *       return None
 *     elif null_indicator == self.ENCODE_PRESENT:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ENCODE_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_null_indicator, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "apache_beam/coders/coder_impl.py":747
 *     null_indicator = in_stream.read_byte()
 *     if null_indicator == self.ENCODE_NULL:
 *       return None             # <<<<<<<<<<<<<<
 *     elif null_indicator == self.ENCODE_PRESENT:
 *       return self._value_coder.decode_from_stream(in_stream, nested)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":746
 *   def decode_from_stream(self, in_stream, nested):
 *     null_indicator = in_stream.read_byte()
 *     if null_indicator == self.ENCODE_NULL:             # <<<<<<<<<<<<<<
 *       return None
 *     elif null_indicator == self.ENCODE_PRESENT:
 */
  }

  /* "apache_beam/coders/coder_impl.py":748
 *     if null_indicator == self.ENCODE_NULL:
 *       return None
 *     elif null_indicator == self.ENCODE_PRESENT:             # <<<<<<<<<<<<<<
 *       return self._value_coder.decode_from_stream(in_stream, nested)
 *     else:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ENCODE_PRESENT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_null_indicator, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_4)) {

    /* "apache_beam/coders/coder_impl.py":749
 *       return None
 *     elif null_indicator == self.ENCODE_PRESENT:
 *       return self._value_coder.decode_from_stream(in_stream, nested)             # <<<<<<<<<<<<<<
 *     else:
 *       raise ValueError(
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value_coder_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __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 && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_in_stream, __pyx_v_nested};
      __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, 749, __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_v_in_stream, __pyx_v_nested};
      __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, 749, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_INCREF(__pyx_v_in_stream);
      __Pyx_GIVEREF(__pyx_v_in_stream);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_in_stream);
      __Pyx_INCREF(__pyx_v_nested);
      __Pyx_GIVEREF(__pyx_v_nested);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_nested);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":748
 *     if null_indicator == self.ENCODE_NULL:
 *       return None
 *     elif null_indicator == self.ENCODE_PRESENT:             # <<<<<<<<<<<<<<
 *       return self._value_coder.decode_from_stream(in_stream, nested)
 *     else:
 */
  }

  /* "apache_beam/coders/coder_impl.py":751
 *       return self._value_coder.decode_from_stream(in_stream, nested)
 *     else:
 *       raise ValueError(             # <<<<<<<<<<<<<<
 *           "Encountered unexpected value for null indicator: '%s'" %
 *           null_indicator)
 */
  /*else*/ {

    /* "apache_beam/coders/coder_impl.py":752
 *     else:
 *       raise ValueError(
 *           "Encountered unexpected value for null indicator: '%s'" %             # <<<<<<<<<<<<<<
 *           null_indicator)
 * 
 */
    __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Encountered_unexpected_value_for, __pyx_v_null_indicator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/coders/coder_impl.py":751
 *       return self._value_coder.decode_from_stream(in_stream, nested)
 *     else:
 *       raise ValueError(             # <<<<<<<<<<<<<<
 *           "Encountered unexpected value for null indicator: '%s'" %
 *           null_indicator)
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 751, __pyx_L1_error)
  }

  /* "apache_beam/coders/coder_impl.py":744
 *       self._value_coder.encode_to_stream(value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     null_indicator = in_stream.read_byte()
 *     if null_indicator == self.ENCODE_NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_null_indicator);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":755
 *           null_indicator)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     return 1 + (
 *         self._value_coder.estimate_size(unused_value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_unused_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_unused_value,&__pyx_n_s_nested,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((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  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_unused_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, 1); __PYX_ERR(0, 755, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 755, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_unused_value = values[1];
    __pyx_v_nested = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 755, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_6estimate_size(__pyx_self, __pyx_v_self, __pyx_v_unused_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_unused_value, CYTHON_UNUSED PyObject *__pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);

  /* "apache_beam/coders/coder_impl.py":756
 * 
 *   def estimate_size(self, unused_value, nested=False):
 *     return 1 + (             # <<<<<<<<<<<<<<
 *         self._value_coder.estimate_size(unused_value)
 *         if unused_value is not None else 0)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":758
 *     return 1 + (
 *         self._value_coder.estimate_size(unused_value)
 *         if unused_value is not None else 0)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (__pyx_v_unused_value != Py_None);
  if ((__pyx_t_2 != 0)) {

    /* "apache_beam/coders/coder_impl.py":757
 *   def estimate_size(self, unused_value, nested=False):
 *     return 1 + (
 *         self._value_coder.estimate_size(unused_value)             # <<<<<<<<<<<<<<
 *         if unused_value is not None else 0)
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value_coder_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_unused_value) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_unused_value);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
  }

  /* "apache_beam/coders/coder_impl.py":756
 * 
 *   def estimate_size(self, unused_value, nested=False):
 *     return 1 + (             # <<<<<<<<<<<<<<
 *         self._value_coder.estimate_size(unused_value)
 *         if unused_value is not None else 0)
 */
  __pyx_t_3 = __Pyx_PyInt_AddCObj(__pyx_int_1, __pyx_t_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":755
 *           null_indicator)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     return 1 + (
 *         self._value_coder.estimate_size(unused_value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.NullableCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":763
 * class BigEndianShortCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_bigendian_int16(value)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int16_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 763, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 763, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 763, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 763, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 763, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":765
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_bigendian_int16(value)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_8 = __Pyx_PyInt_As_int16_t(__pyx_v_value); if (unlikely((__pyx_t_8 == ((int16_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 765, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int16(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":763
 * class BigEndianShortCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_bigendian_int16(value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 763, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 763, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 763, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 763, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 763, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 763, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":767
 *     out.write_bigendian_int16(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_int16()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int16_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 767, __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_in_stream), __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, 767, __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_in_stream), __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, 767, __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, 767, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 767, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":769
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_int16()             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, unused_value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_int16(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((int16_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 769, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_int16_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":767
 *     out.write_bigendian_int16(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_int16()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 767, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 767, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 767, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 767, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":771
 *     return in_stream.read_bigendian_int16()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A short is encoded as 2 bytes, regardless of nesting.
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __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, __pyx_v_unused_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, 771, __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, __pyx_v_unused_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, 771, __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, 771, __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_unused_value);
          __Pyx_GIVEREF(__pyx_v_unused_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_unused_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, 771, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":774
 *     # type: (Any, bool) -> int
 *     # A short is encoded as 2 bytes, regardless of nesting.
 *     return 2             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_2);
  __pyx_r = __pyx_int_2;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":771
 *     return in_stream.read_bigendian_int16()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A short is encoded as 2 bytes, regardless of nesting.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_unused_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unused_value,&__pyx_n_s_nested,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_unused_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 771, __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_unused_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 771, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_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_6coders_10coder_impl_23BigEndianShortCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BigEndianShortCod); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_BigEndianShortCod); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_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_6coders_10coder_impl_23BigEndianShortCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigEndianShortCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":779
 * class SinglePrecisionFloatCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_float(value)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  float __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 779, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 779, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 779, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 779, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":781
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_float(value)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 781, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_float(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":779
 * class SinglePrecisionFloatCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_float(value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 779, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 779, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 779, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 779, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 779, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":783
 *     out.write_bigendian_float(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_float()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  float __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 783, __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_in_stream), __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, 783, __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_in_stream), __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, 783, __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, 783, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 783, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":785
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_float()             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, unused_value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_float(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((float)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L1_error)
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":783
 *     out.write_bigendian_float(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_float()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 783, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 783, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 783, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 783, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":787
 *     return in_stream.read_bigendian_float()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A float is encoded as 4 bytes, regardless of nesting.
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __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, __pyx_v_unused_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, 787, __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, __pyx_v_unused_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, 787, __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, 787, __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_unused_value);
          __Pyx_GIVEREF(__pyx_v_unused_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_unused_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, 787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":790
 *     # type: (Any, bool) -> int
 *     # A float is encoded as 4 bytes, regardless of nesting.
 *     return 4             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_4);
  __pyx_r = __pyx_int_4;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":787
 *     return in_stream.read_bigendian_float()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A float is encoded as 4 bytes, regardless of nesting.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_unused_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unused_value,&__pyx_n_s_nested,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_unused_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 787, __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_unused_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 787, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 787, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_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_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_SinglePrecisionFl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_SinglePrecisionFl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_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_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":795
 * class FloatCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_double(value)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  double __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 795, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 795, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 795, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 795, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":797
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_double(value)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 797, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_double(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":795
 * class FloatCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_double(value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 795, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 795, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 795, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 795, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 795, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 795, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":799
 *     out.write_bigendian_double(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_double()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  double __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 799, __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_in_stream), __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, 799, __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_in_stream), __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, 799, __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, 799, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 799, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":801
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_double()             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, unused_value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_double(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((double)-1.0) && PyErr_Occurred())) __PYX_ERR(0, 801, __pyx_L1_error)
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":799
 *     out.write_bigendian_double(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_double()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 799, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 799, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 799, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 799, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 799, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":803
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A double is encoded as 8 bytes, regardless of nesting.
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 803, __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, __pyx_v_unused_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, 803, __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, __pyx_v_unused_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, 803, __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, 803, __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_unused_value);
          __Pyx_GIVEREF(__pyx_v_unused_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_unused_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, 803, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":806
 *     # type: (Any, bool) -> int
 *     # A double is encoded as 8 bytes, regardless of nesting.
 *     return 8             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_8);
  __pyx_r = __pyx_int_8;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":803
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A double is encoded as 8 bytes, regardless of nesting.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_unused_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unused_value,&__pyx_n_s_nested,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_unused_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 803, __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_unused_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 803, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 803, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_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_6coders_10coder_impl_14FloatCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_FloatCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_FloatCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_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_6coders_10coder_impl_14FloatCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.FloatCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":817
 * 
 *   # TODO: Fn Harness only supports millis. Is this important enough to fix?
 *   def _to_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert "lexicographically ordered unsigned" to signed."""
 *     return value - _TIME_SHIFT
 */

static uint64_t __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, int64_t __pyx_v_value) {
  uint64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_to_normal_time", 0);

  /* "apache_beam/coders/coder_impl.py":819
 *   def _to_normal_time(self, value):
 *     """Convert "lexicographically ordered unsigned" to signed."""
 *     return value - _TIME_SHIFT             # <<<<<<<<<<<<<<
 * 
 *   def _from_normal_time(self, value):
 */
  __pyx_r = (__pyx_v_value - __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT);
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":817
 * 
 *   # TODO: Fn Harness only supports millis. Is this important enough to fix?
 *   def _to_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert "lexicographically ordered unsigned" to signed."""
 *     return value - _TIME_SHIFT
 */

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

/* "apache_beam/coders/coder_impl.py":821
 *     return value - _TIME_SHIFT
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + _TIME_SHIFT
 */

static int64_t __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, uint64_t __pyx_v_value) {
  int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_normal_time", 0);

  /* "apache_beam/coders/coder_impl.py":823
 *   def _from_normal_time(self, value):
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + _TIME_SHIFT             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __pyx_r = (__pyx_v_value + __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT);
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":821
 *     return value - _TIME_SHIFT
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + _TIME_SHIFT
 */

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

/* "apache_beam/coders/coder_impl.py":825
 *     return value + _TIME_SHIFT
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (IntervalWindow, create_OutputStream, bool) -> None
 *     typed_value = value
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_typed_value = 0;
  int64_t __pyx_v_span_millis;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 825, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 825, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 825, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 825, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 825, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":827
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (IntervalWindow, create_OutputStream, bool) -> None
 *     typed_value = value             # <<<<<<<<<<<<<<
 *     span_millis = (
 *         typed_value._end_micros // 1000 - typed_value._start_micros // 1000)
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase))))) __PYX_ERR(0, 827, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_typed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":829
 *     typed_value = value
 *     span_millis = (
 *         typed_value._end_micros // 1000 - typed_value._start_micros // 1000)             # <<<<<<<<<<<<<<
 *     out.write_bigendian_uint64(
 *         self._from_normal_time(typed_value._end_micros // 1000))
 */
  __pyx_v_span_millis = (__Pyx_div_int64_t(__pyx_v_typed_value->_end_micros, 0x3E8) - __Pyx_div_int64_t(__pyx_v_typed_value->_start_micros, 0x3E8));

  /* "apache_beam/coders/coder_impl.py":830
 *     span_millis = (
 *         typed_value._end_micros // 1000 - typed_value._start_micros // 1000)
 *     out.write_bigendian_uint64(             # <<<<<<<<<<<<<<
 *         self._from_normal_time(typed_value._end_micros // 1000))
 *     out.write_var_int64(span_millis)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_uint64(__pyx_v_out, ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_from_normal_time(__pyx_v_self, __Pyx_div_int64_t(__pyx_v_typed_value->_end_micros, 0x3E8)), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":832
 *     out.write_bigendian_uint64(
 *         self._from_normal_time(typed_value._end_micros // 1000))
 *     out.write_var_int64(span_millis)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_, nested):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_v_span_millis, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":825
 *     return value + _TIME_SHIFT
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (IntervalWindow, create_OutputStream, bool) -> None
 *     typed_value = value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_typed_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 825, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 825, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 825, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 825, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 825, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 825, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":834
 *     out.write_var_int64(span_millis)
 * 
 *   def decode_from_stream(self, in_, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> IntervalWindow
 *     if not TYPE_CHECKING:
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_typed_value = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  uint64_t __pyx_t_10;
  int64_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __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_in_), __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, 834, __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_in_), __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, 834, __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, 834, __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_in_));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_));
          __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, 834, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":836
 *   def decode_from_stream(self, in_, nested):
 *     # type: (create_InputStream, bool) -> IntervalWindow
 *     if not TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *       global IntervalWindow  # pylint: disable=global-variable-not-assigned
 *       if IntervalWindow is None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_TYPE_CHECKING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = ((!__pyx_t_8) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":838
 *     if not TYPE_CHECKING:
 *       global IntervalWindow  # pylint: disable=global-variable-not-assigned
 *       if IntervalWindow is None:             # <<<<<<<<<<<<<<
 *         from apache_beam.transforms.window import IntervalWindow
 *     # instantiating with None is not part of the public interface
 */
    __pyx_t_9 = (__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow == Py_None);
    __pyx_t_8 = (__pyx_t_9 != 0);
    if (__pyx_t_8) {

      /* "apache_beam/coders/coder_impl.py":839
 *       global IntervalWindow  # pylint: disable=global-variable-not-assigned
 *       if IntervalWindow is None:
 *         from apache_beam.transforms.window import IntervalWindow             # <<<<<<<<<<<<<<
 *     # instantiating with None is not part of the public interface
 *     typed_value = IntervalWindow(None, None)  # type: ignore[arg-type]
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_n_s_IntervalWindow);
      __Pyx_GIVEREF(__pyx_n_s_IntervalWindow);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_IntervalWindow);
      __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_window, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __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_IntervalWindow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow);
      __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":838
 *     if not TYPE_CHECKING:
 *       global IntervalWindow  # pylint: disable=global-variable-not-assigned
 *       if IntervalWindow is None:             # <<<<<<<<<<<<<<
 *         from apache_beam.transforms.window import IntervalWindow
 *     # instantiating with None is not part of the public interface
 */
    }

    /* "apache_beam/coders/coder_impl.py":836
 *   def decode_from_stream(self, in_, nested):
 *     # type: (create_InputStream, bool) -> IntervalWindow
 *     if not TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *       global IntervalWindow  # pylint: disable=global-variable-not-assigned
 *       if IntervalWindow is None:
 */
  }

  /* "apache_beam/coders/coder_impl.py":841
 *         from apache_beam.transforms.window import IntervalWindow
 *     # instantiating with None is not part of the public interface
 *     typed_value = IntervalWindow(None, None)  # type: ignore[arg-type]             # <<<<<<<<<<<<<<
 *     typed_value._end_micros = (
 *         1000 * self._to_normal_time(in_.read_bigendian_uint64()))
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase))))) __PYX_ERR(0, 841, __pyx_L1_error)
  __pyx_v_typed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":843
 *     typed_value = IntervalWindow(None, None)  # type: ignore[arg-type]
 *     typed_value._end_micros = (
 *         1000 * self._to_normal_time(in_.read_bigendian_uint64()))             # <<<<<<<<<<<<<<
 *     typed_value._start_micros = (
 *         typed_value._end_micros - 1000 * in_.read_var_int64())
 */
  __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_->__pyx_vtab)->read_bigendian_uint64(__pyx_v_in_, 0); if (unlikely(__pyx_t_10 == ((uint64_t)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 843, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":842
 *     # instantiating with None is not part of the public interface
 *     typed_value = IntervalWindow(None, None)  # type: ignore[arg-type]
 *     typed_value._end_micros = (             # <<<<<<<<<<<<<<
 *         1000 * self._to_normal_time(in_.read_bigendian_uint64()))
 *     typed_value._start_micros = (
 */
  __pyx_v_typed_value->_end_micros = (0x3E8 * ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_to_normal_time(__pyx_v_self, __pyx_t_10));

  /* "apache_beam/coders/coder_impl.py":845
 *         1000 * self._to_normal_time(in_.read_bigendian_uint64()))
 *     typed_value._start_micros = (
 *         typed_value._end_micros - 1000 * in_.read_var_int64())             # <<<<<<<<<<<<<<
 *     return typed_value
 * 
 */
  __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_->__pyx_vtab)->read_var_int64(__pyx_v_in_, 0); if (unlikely(__pyx_t_11 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":844
 *     typed_value._end_micros = (
 *         1000 * self._to_normal_time(in_.read_bigendian_uint64()))
 *     typed_value._start_micros = (             # <<<<<<<<<<<<<<
 *         typed_value._end_micros - 1000 * in_.read_var_int64())
 *     return typed_value
 */
  __pyx_v_typed_value->_start_micros = (__pyx_v_typed_value->_end_micros - (0x3E8 * __pyx_t_11));

  /* "apache_beam/coders/coder_impl.py":846
 *     typed_value._start_micros = (
 *         typed_value._end_micros - 1000 * in_.read_var_int64())
 *     return typed_value             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_typed_value));
  __pyx_r = ((PyObject *)__pyx_v_typed_value);
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":834
 *     out.write_var_int64(span_millis)
 * 
 *   def decode_from_stream(self, in_, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> IntervalWindow
 *     if not TYPE_CHECKING:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_typed_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_ = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in,&__pyx_n_s_nested,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_in)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 834, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 834, __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_in_ = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 834, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 834, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_", 0))) __PYX_ERR(0, 834, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self), __pyx_v_in_, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":848
 *     return typed_value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *__pyx_v_typed_value = 0;
  int64_t __pyx_v_span_millis;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __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, __pyx_v_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, 848, __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, __pyx_v_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, 848, __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, 848, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 848, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":852
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 *     # and a varint timespam.
 *     typed_value = value             # <<<<<<<<<<<<<<
 *     span_millis = (
 *         typed_value._end_micros // 1000 - typed_value._start_micros // 1000)
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase))))) __PYX_ERR(0, 852, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_typed_value = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":854
 *     typed_value = value
 *     span_millis = (
 *         typed_value._end_micros // 1000 - typed_value._start_micros // 1000)             # <<<<<<<<<<<<<<
 *     return 8 + get_varint_size(span_millis)
 * 
 */
  __pyx_v_span_millis = (__Pyx_div_int64_t(__pyx_v_typed_value->_end_micros, 0x3E8) - __Pyx_div_int64_t(__pyx_v_typed_value->_start_micros, 0x3E8));

  /* "apache_beam/coders/coder_impl.py":855
 *     span_millis = (
 *         typed_value._end_micros // 1000 - typed_value._start_micros // 1000)
 *     return 8 + get_varint_size(span_millis)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_span_millis); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
  __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_AddCObj(__pyx_int_8, __pyx_t_1, 8, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":848
 *     return typed_value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_typed_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 848, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 848, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_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_6coders_10coder_impl_23IntervalWindowCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_IntervalWindowCod); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_IntervalWindowCod); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_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_6coders_10coder_impl_23IntervalWindowCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":866
 *   https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79
 *   """
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Timestamp, create_OutputStream, bool) -> None
 *     millis = value.micros // 1000
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_millis = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int64_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 866, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 866, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 866, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 866, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":868
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (Timestamp, create_OutputStream, bool) -> None
 *     millis = value.micros // 1000             # <<<<<<<<<<<<<<
 *     if millis >= 0:
 *       millis = millis - _TIME_SHIFT
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_1, __pyx_int_1000, 0x3E8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_millis = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":869
 *     # type: (Timestamp, create_OutputStream, bool) -> None
 *     millis = value.micros // 1000
 *     if millis >= 0:             # <<<<<<<<<<<<<<
 *       millis = millis - _TIME_SHIFT
 *     else:
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_millis, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":870
 *     millis = value.micros // 1000
 *     if millis >= 0:
 *       millis = millis - _TIME_SHIFT             # <<<<<<<<<<<<<<
 *     else:
 *       millis = millis + _TIME_SHIFT
 */
    __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_millis, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_millis, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":869
 *     # type: (Timestamp, create_OutputStream, bool) -> None
 *     millis = value.micros // 1000
 *     if millis >= 0:             # <<<<<<<<<<<<<<
 *       millis = millis - _TIME_SHIFT
 *     else:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":872
 *       millis = millis - _TIME_SHIFT
 *     else:
 *       millis = millis + _TIME_SHIFT             # <<<<<<<<<<<<<<
 *     out.write_bigendian_int64(millis)
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Add(__pyx_v_millis, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_millis, __pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":873
 *     else:
 *       millis = millis + _TIME_SHIFT
 *     out.write_bigendian_int64(millis)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_millis); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int64(__pyx_v_out, __pyx_t_9, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":866
 *   https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79
 *   """
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Timestamp, create_OutputStream, bool) -> None
 *     millis = value.micros // 1000
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_millis);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 866, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 866, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 866, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 866, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 866, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 866, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":875
 *     out.write_bigendian_int64(millis)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Timestamp
 *     millis = in_stream.read_bigendian_int64()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_millis = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int64_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __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_in_stream), __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, 875, __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_in_stream), __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, 875, __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, 875, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 875, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":877
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> Timestamp
 *     millis = in_stream.read_bigendian_int64()             # <<<<<<<<<<<<<<
 *     if millis < 0:
 *       millis = millis + _TIME_SHIFT
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 877, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_millis = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":878
 *     # type: (create_InputStream, bool) -> Timestamp
 *     millis = in_stream.read_bigendian_int64()
 *     if millis < 0:             # <<<<<<<<<<<<<<
 *       millis = millis + _TIME_SHIFT
 *     else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_millis, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 878, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":879
 *     millis = in_stream.read_bigendian_int64()
 *     if millis < 0:
 *       millis = millis + _TIME_SHIFT             # <<<<<<<<<<<<<<
 *     else:
 *       millis = millis - _TIME_SHIFT
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Add(__pyx_v_millis, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_millis, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":878
 *     # type: (create_InputStream, bool) -> Timestamp
 *     millis = in_stream.read_bigendian_int64()
 *     if millis < 0:             # <<<<<<<<<<<<<<
 *       millis = millis + _TIME_SHIFT
 *     else:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":881
 *       millis = millis + _TIME_SHIFT
 *     else:
 *       millis = millis - _TIME_SHIFT             # <<<<<<<<<<<<<<
 *     return Timestamp(micros=millis * 1000)
 * 
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_millis, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_millis, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":882
 *     else:
 *       millis = millis - _TIME_SHIFT
 *     return Timestamp(micros=millis * 1000)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, unused_value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyNumber_Multiply(__pyx_v_millis, __pyx_int_1000); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_micros, __pyx_t_4) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":875
 *     out.write_bigendian_int64(millis)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Timestamp
 *     millis = in_stream.read_bigendian_int64()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_millis);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 875, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 875, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 875, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 875, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 875, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":884
 *     return Timestamp(micros=millis * 1000)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of
 *     # nesting.
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_unused_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __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, __pyx_v_unused_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, 884, __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, __pyx_v_unused_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, 884, __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, 884, __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_unused_value);
          __Pyx_GIVEREF(__pyx_v_unused_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_unused_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, 884, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":887
 *     # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of
 *     # nesting.
 *     return 8             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_8);
  __pyx_r = __pyx_int_8;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":884
 *     return Timestamp(micros=millis * 1000)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of
 *     # nesting.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_unused_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unused_value,&__pyx_n_s_nested,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_unused_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 884, __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_unused_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 884, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self), __pyx_v_unused_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v_unused_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_unused_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_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_6coders_10coder_impl_18TimestampCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.timestamp_class,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->timestamp_class);
  __Pyx_GIVEREF(__pyx_v_self->timestamp_class);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->timestamp_class);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.timestamp_class,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.timestamp_class,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.timestamp_class is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.timestamp_class,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.timestamp_class is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->timestamp_class != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.timestamp_class is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.timestamp_class is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TimestampCoderImp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_18374862);
    __Pyx_GIVEREF(__pyx_int_18374862);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_18374862);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.timestamp_class is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, None), state
 *     else:
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_TimestampCoderImp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_18374862);
    __Pyx_GIVEREF(__pyx_int_18374862);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_18374862);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_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_6coders_10coder_impl_18TimestampCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":892
 * class TimerCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, key_coder_impl, window_coder_impl):             # <<<<<<<<<<<<<<
 *     self._timestamp_coder_impl = TimestampCoderImpl()
 *     self._boolean_coder_impl = BooleanCoderImpl()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key_coder_impl = 0;
  PyObject *__pyx_v_window_coder_impl = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key_coder_impl,&__pyx_n_s_window_coder_impl,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_key_coder_impl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 892, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window_coder_impl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 892, __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, 892, __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_key_coder_impl = values[1];
    __pyx_v_window_coder_impl = 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, 892, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_key_coder_impl, __pyx_v_window_coder_impl);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_coder_impl, PyObject *__pyx_v_window_coder_impl) {
  PyObject *__pyx_v_StrUtf8Coder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":893
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, key_coder_impl, window_coder_impl):
 *     self._timestamp_coder_impl = TimestampCoderImpl()             # <<<<<<<<<<<<<<
 *     self._boolean_coder_impl = BooleanCoderImpl()
 *     self._pane_info_coder_impl = PaneInfoCoderImpl()
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timestamp_coder_impl, __pyx_t_1) < 0) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":894
 *   def __init__(self, key_coder_impl, window_coder_impl):
 *     self._timestamp_coder_impl = TimestampCoderImpl()
 *     self._boolean_coder_impl = BooleanCoderImpl()             # <<<<<<<<<<<<<<
 *     self._pane_info_coder_impl = PaneInfoCoderImpl()
 *     self._key_coder_impl = key_coder_impl
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_boolean_coder_impl, __pyx_t_1) < 0) __PYX_ERR(0, 894, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":895
 *     self._timestamp_coder_impl = TimestampCoderImpl()
 *     self._boolean_coder_impl = BooleanCoderImpl()
 *     self._pane_info_coder_impl = PaneInfoCoderImpl()             # <<<<<<<<<<<<<<
 *     self._key_coder_impl = key_coder_impl
 *     self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pane_info_coder_impl, __pyx_t_1) < 0) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":896
 *     self._boolean_coder_impl = BooleanCoderImpl()
 *     self._pane_info_coder_impl = PaneInfoCoderImpl()
 *     self._key_coder_impl = key_coder_impl             # <<<<<<<<<<<<<<
 *     self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl)
 *     from apache_beam.coders.coders import StrUtf8Coder
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_key_coder_impl_2, __pyx_v_key_coder_impl) < 0) __PYX_ERR(0, 896, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":897
 *     self._pane_info_coder_impl = PaneInfoCoderImpl()
 *     self._key_coder_impl = key_coder_impl
 *     self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl)             # <<<<<<<<<<<<<<
 *     from apache_beam.coders.coders import StrUtf8Coder
 *     self._tag_coder_impl = StrUtf8Coder().get_impl()
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), __pyx_v_window_coder_impl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_windows_coder_impl, __pyx_t_1) < 0) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":898
 *     self._key_coder_impl = key_coder_impl
 *     self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl)
 *     from apache_beam.coders.coders import StrUtf8Coder             # <<<<<<<<<<<<<<
 *     self._tag_coder_impl = StrUtf8Coder().get_impl()
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_StrUtf8Coder);
  __Pyx_GIVEREF(__pyx_n_s_StrUtf8Coder);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_StrUtf8Coder);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_coders_coders, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __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_StrUtf8Coder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_StrUtf8Coder = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":899
 *     self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl)
 *     from apache_beam.coders.coders import StrUtf8Coder
 *     self._tag_coder_impl = StrUtf8Coder().get_impl()             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __Pyx_INCREF(__pyx_v_StrUtf8Coder);
  __pyx_t_3 = __pyx_v_StrUtf8Coder; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tag_coder_impl, __pyx_t_2) < 0) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":892
 * class TimerCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, key_coder_impl, window_coder_impl):             # <<<<<<<<<<<<<<
 *     self._timestamp_coder_impl = TimestampCoderImpl()
 *     self._boolean_coder_impl = BooleanCoderImpl()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_StrUtf8Coder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":901
 *     self._tag_coder_impl = StrUtf8Coder().get_impl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (userstate.Timer, create_OutputStream, bool) -> None
 *     self._key_coder_impl.encode_to_stream(value.user_key, out, True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_out = 0;
  CYTHON_UNUSED PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 1); __PYX_ERR(0, 901, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 2); __PYX_ERR(0, 901, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 3); __PYX_ERR(0, 901, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 901, __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_self = values[0];
    __pyx_v_value = values[1];
    __pyx_v_out = values[2];
    __pyx_v_nested = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 901, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_2encode_to_stream(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, CYTHON_UNUSED PyObject *__pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);

  /* "apache_beam/coders/coder_impl.py":903
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (userstate.Timer, create_OutputStream, bool) -> None
 *     self._key_coder_impl.encode_to_stream(value.user_key, out, True)             # <<<<<<<<<<<<<<
 *     self._tag_coder_impl.encode_to_stream(value.dynamic_timer_tag, out, True)
 *     self._windows_coder_impl.encode_to_stream(value.windows, out, True)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_key_coder_impl_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_user_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_out);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, Py_True);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":904
 *     # type: (userstate.Timer, create_OutputStream, bool) -> None
 *     self._key_coder_impl.encode_to_stream(value.user_key, out, True)
 *     self._tag_coder_impl.encode_to_stream(value.dynamic_timer_tag, out, True)             # <<<<<<<<<<<<<<
 *     self._windows_coder_impl.encode_to_stream(value.windows, out, True)
 *     self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tag_coder_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_dynamic_timer_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_3, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __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_6)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_3, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __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_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __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_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_out);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, Py_True);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":905
 *     self._key_coder_impl.encode_to_stream(value.user_key, out, True)
 *     self._tag_coder_impl.encode_to_stream(value.dynamic_timer_tag, out, True)
 *     self._windows_coder_impl.encode_to_stream(value.windows, out, True)             # <<<<<<<<<<<<<<
 *     self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True)
 *     if not value.clear_bit:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_windows_coder_impl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_windows); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_6, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_6, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_v_out);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_5, Py_True);
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":906
 *     self._tag_coder_impl.encode_to_stream(value.dynamic_timer_tag, out, True)
 *     self._windows_coder_impl.encode_to_stream(value.windows, out, True)
 *     self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True)             # <<<<<<<<<<<<<<
 *     if not value.clear_bit:
 *       self._timestamp_coder_impl.encode_to_stream(
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_boolean_coder_impl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_clear_bit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __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[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_out);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_5, Py_True);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":907
 *     self._windows_coder_impl.encode_to_stream(value.windows, out, True)
 *     self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True)
 *     if not value.clear_bit:             # <<<<<<<<<<<<<<
 *       self._timestamp_coder_impl.encode_to_stream(
 *           value.fire_timestamp, out, True)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_clear_bit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":908
 *     self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True)
 *     if not value.clear_bit:
 *       self._timestamp_coder_impl.encode_to_stream(             # <<<<<<<<<<<<<<
 *           value.fire_timestamp, out, True)
 *       self._timestamp_coder_impl.encode_to_stream(
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timestamp_coder_impl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":909
 *     if not value.clear_bit:
 *       self._timestamp_coder_impl.encode_to_stream(
 *           value.fire_timestamp, out, True)             # <<<<<<<<<<<<<<
 *       self._timestamp_coder_impl.encode_to_stream(
 *           value.hold_timestamp, out, True)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_fire_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_v_out, Py_True};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_v_out, Py_True};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
      __Pyx_INCREF(__pyx_v_out);
      __Pyx_GIVEREF(__pyx_v_out);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_out);
      __Pyx_INCREF(Py_True);
      __Pyx_GIVEREF(Py_True);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, Py_True);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":910
 *       self._timestamp_coder_impl.encode_to_stream(
 *           value.fire_timestamp, out, True)
 *       self._timestamp_coder_impl.encode_to_stream(             # <<<<<<<<<<<<<<
 *           value.hold_timestamp, out, True)
 *       self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timestamp_coder_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":911
 *           value.fire_timestamp, out, True)
 *       self._timestamp_coder_impl.encode_to_stream(
 *           value.hold_timestamp, out, True)             # <<<<<<<<<<<<<<
 *       self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_hold_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 911, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_3, __pyx_v_out, Py_True};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __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_6)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_3, __pyx_v_out, Py_True};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __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_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __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_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_t_3);
      __Pyx_INCREF(__pyx_v_out);
      __Pyx_GIVEREF(__pyx_v_out);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_out);
      __Pyx_INCREF(Py_True);
      __Pyx_GIVEREF(Py_True);
      PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, Py_True);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":912
 *       self._timestamp_coder_impl.encode_to_stream(
 *           value.hold_timestamp, out, True)
 *       self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pane_info_coder_impl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_paneinfo); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_6, __pyx_v_out, Py_True};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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_4)) {
      PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_6, __pyx_v_out, Py_True};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __pyx_t_6);
      __Pyx_INCREF(__pyx_v_out);
      __Pyx_GIVEREF(__pyx_v_out);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_v_out);
      __Pyx_INCREF(Py_True);
      __Pyx_GIVEREF(Py_True);
      PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_5, Py_True);
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_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_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":907
 *     self._windows_coder_impl.encode_to_stream(value.windows, out, True)
 *     self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True)
 *     if not value.clear_bit:             # <<<<<<<<<<<<<<
 *       self._timestamp_coder_impl.encode_to_stream(
 *           value.fire_timestamp, out, True)
 */
  }

  /* "apache_beam/coders/coder_impl.py":901
 *     self._tag_coder_impl = StrUtf8Coder().get_impl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (userstate.Timer, create_OutputStream, bool) -> None
 *     self._key_coder_impl.encode_to_stream(value.user_key, out, True)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":914
 *       self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> userstate.Timer
 *     from apache_beam.transforms import userstate
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_in_stream = 0;
  CYTHON_UNUSED PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, 1); __PYX_ERR(0, 914, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, 2); __PYX_ERR(0, 914, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 914, __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_in_stream = values[1];
    __pyx_v_nested = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 914, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_4decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, CYTHON_UNUSED PyObject *__pyx_v_nested) {
  PyObject *__pyx_v_userstate = NULL;
  PyObject *__pyx_v_user_key = NULL;
  PyObject *__pyx_v_dynamic_timer_tag = NULL;
  PyObject *__pyx_v_windows = NULL;
  PyObject *__pyx_v_clear_bit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);

  /* "apache_beam/coders/coder_impl.py":916
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> userstate.Timer
 *     from apache_beam.transforms import userstate             # <<<<<<<<<<<<<<
 *     user_key = self._key_coder_impl.decode_from_stream(in_stream, True)
 *     dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True)
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_userstate);
  __Pyx_GIVEREF(__pyx_n_s_userstate);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_userstate);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 916, __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_userstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_userstate = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":917
 *     # type: (create_InputStream, bool) -> userstate.Timer
 *     from apache_beam.transforms import userstate
 *     user_key = self._key_coder_impl.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *     dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True)
 *     windows = self._windows_coder_impl.decode_from_stream(in_stream, True)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_key_coder_impl_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_v_in_stream);
    __Pyx_GIVEREF(__pyx_v_in_stream);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_in_stream);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, Py_True);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __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_v_user_key = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":918
 *     from apache_beam.transforms import userstate
 *     user_key = self._key_coder_impl.decode_from_stream(in_stream, True)
 *     dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *     windows = self._windows_coder_impl.decode_from_stream(in_stream, True)
 *     clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tag_coder_impl); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_in_stream);
    __Pyx_GIVEREF(__pyx_v_in_stream);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_4, __pyx_v_in_stream);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_4, Py_True);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __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_dynamic_timer_tag = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":919
 *     user_key = self._key_coder_impl.decode_from_stream(in_stream, True)
 *     dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True)
 *     windows = self._windows_coder_impl.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *     clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True)
 *     if clear_bit:
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_windows_coder_impl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 919, __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[3] = {__pyx_t_5, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __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_v_in_stream);
    __Pyx_GIVEREF(__pyx_v_in_stream);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_v_in_stream);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, Py_True);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 919, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_windows = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":920
 *     dynamic_timer_tag = self._tag_coder_impl.decode_from_stream(in_stream, True)
 *     windows = self._windows_coder_impl.decode_from_stream(in_stream, True)
 *     clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *     if clear_bit:
 *       return userstate.Timer(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_boolean_coder_impl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_v_in_stream);
    __Pyx_GIVEREF(__pyx_v_in_stream);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_in_stream);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, Py_True);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __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_v_clear_bit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":921
 *     windows = self._windows_coder_impl.decode_from_stream(in_stream, True)
 *     clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True)
 *     if clear_bit:             # <<<<<<<<<<<<<<
 *       return userstate.Timer(
 *           user_key=user_key,
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_clear_bit); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "apache_beam/coders/coder_impl.py":922
 *     clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True)
 *     if clear_bit:
 *       return userstate.Timer(             # <<<<<<<<<<<<<<
 *           user_key=user_key,
 *           dynamic_timer_tag=dynamic_timer_tag,
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userstate, __pyx_n_s_Timer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "apache_beam/coders/coder_impl.py":923
 *     if clear_bit:
 *       return userstate.Timer(
 *           user_key=user_key,             # <<<<<<<<<<<<<<
 *           dynamic_timer_tag=dynamic_timer_tag,
 *           windows=windows,
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 923, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_user_key, __pyx_v_user_key) < 0) __PYX_ERR(0, 923, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":924
 *       return userstate.Timer(
 *           user_key=user_key,
 *           dynamic_timer_tag=dynamic_timer_tag,             # <<<<<<<<<<<<<<
 *           windows=windows,
 *           clear_bit=clear_bit,
 */
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dynamic_timer_tag, __pyx_v_dynamic_timer_tag) < 0) __PYX_ERR(0, 923, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":925
 *           user_key=user_key,
 *           dynamic_timer_tag=dynamic_timer_tag,
 *           windows=windows,             # <<<<<<<<<<<<<<
 *           clear_bit=clear_bit,
 *           fire_timestamp=None,
 */
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_windows, __pyx_v_windows) < 0) __PYX_ERR(0, 923, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":926
 *           dynamic_timer_tag=dynamic_timer_tag,
 *           windows=windows,
 *           clear_bit=clear_bit,             # <<<<<<<<<<<<<<
 *           fire_timestamp=None,
 *           hold_timestamp=None,
 */
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_clear_bit, __pyx_v_clear_bit) < 0) __PYX_ERR(0, 923, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":927
 *           windows=windows,
 *           clear_bit=clear_bit,
 *           fire_timestamp=None,             # <<<<<<<<<<<<<<
 *           hold_timestamp=None,
 *           paneinfo=None)
 */
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fire_timestamp, Py_None) < 0) __PYX_ERR(0, 923, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":928
 *           clear_bit=clear_bit,
 *           fire_timestamp=None,
 *           hold_timestamp=None,             # <<<<<<<<<<<<<<
 *           paneinfo=None)
 * 
 */
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_hold_timestamp, Py_None) < 0) __PYX_ERR(0, 923, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":929
 *           fire_timestamp=None,
 *           hold_timestamp=None,
 *           paneinfo=None)             # <<<<<<<<<<<<<<
 * 
 *     return userstate.Timer(
 */
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_paneinfo, Py_None) < 0) __PYX_ERR(0, 923, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":922
 *     clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True)
 *     if clear_bit:
 *       return userstate.Timer(             # <<<<<<<<<<<<<<
 *           user_key=user_key,
 *           dynamic_timer_tag=dynamic_timer_tag,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":921
 *     windows = self._windows_coder_impl.decode_from_stream(in_stream, True)
 *     clear_bit = self._boolean_coder_impl.decode_from_stream(in_stream, True)
 *     if clear_bit:             # <<<<<<<<<<<<<<
 *       return userstate.Timer(
 *           user_key=user_key,
 */
  }

  /* "apache_beam/coders/coder_impl.py":931
 *           paneinfo=None)
 * 
 *     return userstate.Timer(             # <<<<<<<<<<<<<<
 *         user_key=user_key,
 *         dynamic_timer_tag=dynamic_timer_tag,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userstate, __pyx_n_s_Timer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "apache_beam/coders/coder_impl.py":932
 * 
 *     return userstate.Timer(
 *         user_key=user_key,             # <<<<<<<<<<<<<<
 *         dynamic_timer_tag=dynamic_timer_tag,
 *         windows=windows,
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_user_key, __pyx_v_user_key) < 0) __PYX_ERR(0, 932, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":933
 *     return userstate.Timer(
 *         user_key=user_key,
 *         dynamic_timer_tag=dynamic_timer_tag,             # <<<<<<<<<<<<<<
 *         windows=windows,
 *         clear_bit=clear_bit,
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dynamic_timer_tag, __pyx_v_dynamic_timer_tag) < 0) __PYX_ERR(0, 932, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":934
 *         user_key=user_key,
 *         dynamic_timer_tag=dynamic_timer_tag,
 *         windows=windows,             # <<<<<<<<<<<<<<
 *         clear_bit=clear_bit,
 *         fire_timestamp=self._timestamp_coder_impl.decode_from_stream(
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_windows, __pyx_v_windows) < 0) __PYX_ERR(0, 932, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":935
 *         dynamic_timer_tag=dynamic_timer_tag,
 *         windows=windows,
 *         clear_bit=clear_bit,             # <<<<<<<<<<<<<<
 *         fire_timestamp=self._timestamp_coder_impl.decode_from_stream(
 *             in_stream, True),
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_clear_bit, __pyx_v_clear_bit) < 0) __PYX_ERR(0, 932, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":936
 *         windows=windows,
 *         clear_bit=clear_bit,
 *         fire_timestamp=self._timestamp_coder_impl.decode_from_stream(             # <<<<<<<<<<<<<<
 *             in_stream, True),
 *         hold_timestamp=self._timestamp_coder_impl.decode_from_stream(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timestamp_coder_impl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":937
 *         clear_bit=clear_bit,
 *         fire_timestamp=self._timestamp_coder_impl.decode_from_stream(
 *             in_stream, True),             # <<<<<<<<<<<<<<
 *         hold_timestamp=self._timestamp_coder_impl.decode_from_stream(
 *             in_stream, True),
 */
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_7)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __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_7)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_v_in_stream);
    __Pyx_GIVEREF(__pyx_v_in_stream);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_v_in_stream);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, Py_True);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fire_timestamp, __pyx_t_2) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":938
 *         fire_timestamp=self._timestamp_coder_impl.decode_from_stream(
 *             in_stream, True),
 *         hold_timestamp=self._timestamp_coder_impl.decode_from_stream(             # <<<<<<<<<<<<<<
 *             in_stream, True),
 *         paneinfo=self._pane_info_coder_impl.decode_from_stream(in_stream, True))
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timestamp_coder_impl); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":939
 *             in_stream, True),
 *         hold_timestamp=self._timestamp_coder_impl.decode_from_stream(
 *             in_stream, True),             # <<<<<<<<<<<<<<
 *         paneinfo=self._pane_info_coder_impl.decode_from_stream(in_stream, True))
 * 
 */
  __pyx_t_7 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(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);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __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_8)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_1 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __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_in_stream);
    __Pyx_GIVEREF(__pyx_v_in_stream);
    PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_4, __pyx_v_in_stream);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_4, Py_True);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_hold_timestamp, __pyx_t_2) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":940
 *         hold_timestamp=self._timestamp_coder_impl.decode_from_stream(
 *             in_stream, True),
 *         paneinfo=self._pane_info_coder_impl.decode_from_stream(in_stream, True))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pane_info_coder_impl); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_in_stream, Py_True};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 940, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_in_stream);
    __Pyx_GIVEREF(__pyx_v_in_stream);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_v_in_stream);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, Py_True);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __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;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_paneinfo, __pyx_t_2) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":931
 *           paneinfo=None)
 * 
 *     return userstate.Timer(             # <<<<<<<<<<<<<<
 *         user_key=user_key,
 *         dynamic_timer_tag=dynamic_timer_tag,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __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;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":914
 *       self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> userstate.Timer
 *     from apache_beam.transforms import userstate
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_userstate);
  __Pyx_XDECREF(__pyx_v_user_key);
  __Pyx_XDECREF(__pyx_v_dynamic_timer_tag);
  __Pyx_XDECREF(__pyx_v_windows);
  __Pyx_XDECREF(__pyx_v_clear_bit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":950
 * 
 *   A coder for int objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_var_int64(value)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int64_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 950, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 950, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 950, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":952
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_var_int64(value)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":950
 * 
 *   A coder for int objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_var_int64(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.coders.coder_impl.VarIntCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 950, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 950, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 950, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 950, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":954
 *     out.write_var_int64(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> int
 *     return in_stream.read_var_int64()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int64_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __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_in_stream), __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, 954, __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_in_stream), __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, 954, __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, 954, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 954, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":956
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> int
 *     return in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 956, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":954
 *     out.write_var_int64(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> int
 *     return in_stream.read_var_int64()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 954, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 954, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 954, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 954, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 954, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":958
 *     return in_stream.read_var_int64()
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  int64_t __pyx_v_ivalue;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int64_t __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 958, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":959
 * 
 *   def encode(self, value):
 *     ivalue = value  # type cast             # <<<<<<<<<<<<<<
 *     if 0 <= ivalue < len(small_ints):
 *       return small_ints[ivalue]
 */
  __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L1_error)
  __pyx_v_ivalue = __pyx_t_5;

  /* "apache_beam/coders/coder_impl.py":960
 *   def encode(self, value):
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):             # <<<<<<<<<<<<<<
 *       return small_ints[ivalue]
 *     return StreamCoderImpl.encode(self, value)
 */
  __pyx_t_6 = (0 <= __pyx_v_ivalue);
  if (__pyx_t_6) {
    __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_small_ints;
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 960, __pyx_L1_error)
    }
    __pyx_t_7 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 960, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = (__pyx_v_ivalue < __pyx_t_7);
  }
  __pyx_t_8 = (__pyx_t_6 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":961
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):
 *       return small_ints[ivalue]             # <<<<<<<<<<<<<<
 *     return StreamCoderImpl.encode(self, value)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 961, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints, __pyx_v_ivalue, int64_t, 1, __Pyx_PyInt_From_int64_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 961, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":960
 *   def encode(self, value):
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):             # <<<<<<<<<<<<<<
 *       return small_ints[ivalue]
 *     return StreamCoderImpl.encode(self, value)
 */
  }

  /* "apache_beam/coders/coder_impl.py":962
 *     if 0 <= ivalue < len(small_ints):
 *       return small_ints[ivalue]
 *     return StreamCoderImpl.encode(self, value)             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":958
 *     return in_stream.read_var_int64()
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode = {"encode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_4encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_4encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":964
 *     return StreamCoderImpl.encode(self, value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) {
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":965
 * 
 *   def decode(self, encoded):
 *     if len(encoded) == 1:             # <<<<<<<<<<<<<<
 *       i = ord(encoded)
 *       if 0 <= i < 128:
 */
  if (unlikely(__pyx_v_encoded == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 965, __pyx_L1_error)
  }
  __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_encoded); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 965, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 == 1) != 0);
  if (__pyx_t_6) {

    /* "apache_beam/coders/coder_impl.py":966
 *   def decode(self, encoded):
 *     if len(encoded) == 1:
 *       i = ord(encoded)             # <<<<<<<<<<<<<<
 *       if 0 <= i < 128:
 *         return i
 */
    __pyx_t_7 = __Pyx_PyObject_Ord(__pyx_v_encoded); if (unlikely(__pyx_t_7 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 966, __pyx_L1_error)
    __pyx_v_i = __pyx_t_7;

    /* "apache_beam/coders/coder_impl.py":967
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 *       if 0 <= i < 128:             # <<<<<<<<<<<<<<
 *         return i
 *     return StreamCoderImpl.decode(self, encoded)
 */
    __pyx_t_6 = (0 <= __pyx_v_i);
    if (__pyx_t_6) {
      __pyx_t_6 = (__pyx_v_i < 0x80);
    }
    __pyx_t_8 = (__pyx_t_6 != 0);
    if (__pyx_t_8) {

      /* "apache_beam/coders/coder_impl.py":968
 *       i = ord(encoded)
 *       if 0 <= i < 128:
 *         return i             # <<<<<<<<<<<<<<
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "apache_beam/coders/coder_impl.py":967
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 *       if 0 <= i < 128:             # <<<<<<<<<<<<<<
 *         return i
 *     return StreamCoderImpl.decode(self, encoded)
 */
    }

    /* "apache_beam/coders/coder_impl.py":965
 * 
 *   def decode(self, encoded):
 *     if len(encoded) == 1:             # <<<<<<<<<<<<<<
 *       i = ord(encoded)
 *       if 0 <= i < 128:
 */
  }

  /* "apache_beam/coders/coder_impl.py":969
 *       if 0 <= i < 128:
 *         return i
 *     return StreamCoderImpl.decode(self, encoded)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v_self), __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":964
 *     return StreamCoderImpl.encode(self, value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode = {"decode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 964, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_6decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), ((PyObject*)__pyx_v_encoded));

  /* 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_6coders_10coder_impl_15VarIntCoderImpl_6decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":971
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # Note that VarInts are encoded the same way regardless of nesting.
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __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, __pyx_v_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, 971, __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, __pyx_v_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, 971, __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, 971, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 971, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":974
 *     # type: (Any, bool) -> int
 *     # Note that VarInts are encoded the same way regardless of nesting.
 *     return get_varint_size(value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":971
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # Note that VarInts are encoded the same way regardless of nesting.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 971, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 971, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 971, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_8estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_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_6coders_10coder_impl_15VarIntCoderImpl_10__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_VarIntCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_VarIntCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_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_6coders_10coder_impl_15VarIntCoderImpl_12__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.VarIntCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":981
 * 
 *   A coder that always encodes exactly one value."""
 *   def __init__(self, value):             # <<<<<<<<<<<<<<
 *     self._value = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 981, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_value = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 981, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_value);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":982
 *   A coder that always encodes exactly one value."""
 *   def __init__(self, value):
 *     self._value = value             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, stream, nested):
 */
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_value);
  __Pyx_DECREF(__pyx_v_self->_value);
  __pyx_v_self->_value = __pyx_v_value;

  /* "apache_beam/coders/coder_impl.py":981
 * 
 *   A coder that always encodes exactly one value."""
 *   def __init__(self, value):             # <<<<<<<<<<<<<<
 *     self._value = value
 * 
 */

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

/* "apache_beam/coders/coder_impl.py":984
 *     self._value = value
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     pass
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 984, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_stream), __pyx_t_3};
          __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, 984, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 984, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":986
 *   def encode_to_stream(self, value, stream, nested):
 *     # type: (Any, create_OutputStream, bool) -> None
 *     pass             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, stream, nested):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":984
 *     self._value = value
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     pass
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_stream,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 984, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 984, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 984, __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_value = values[0];
    __pyx_v_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 984, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 984, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "stream", 0))) __PYX_ERR(0, 984, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":988
 *     pass
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._value
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __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_stream), __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, 988, __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_stream), __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, 988, __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, 988, __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_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_stream));
          __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, 988, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":990
 *   def decode_from_stream(self, stream, nested):
 *     # type: (create_InputStream, bool) -> Any
 *     return self._value             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_value);
  __pyx_r = __pyx_v_self->_value;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":988
 *     pass
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_nested,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_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 988, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 988, __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_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 988, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 988, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "stream", 0))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":992
 *     return self._value
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     b = b''  # avoid byte vs str vs unicode error
 *     return b
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 992, __pyx_L1_error)
        __pyx_r = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":993
 * 
 *   def encode(self, value):
 *     b = b''  # avoid byte vs str vs unicode error             # <<<<<<<<<<<<<<
 *     return b
 * 
 */
  __Pyx_INCREF(__pyx_kp_b__7);
  __pyx_v_b = __pyx_kp_b__7;

  /* "apache_beam/coders/coder_impl.py":994
 *   def encode(self, value):
 *     b = b''  # avoid byte vs str vs unicode error
 *     return b             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_b);
  __pyx_r = __pyx_v_b;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":992
 *     return self._value
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     b = b''  # avoid byte vs str vs unicode error
 *     return b
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode = {"encode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_6encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_6encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":996
 *     return b
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._value
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_encoded, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":997
 * 
 *   def decode(self, encoded):
 *     return self._value             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_value);
  __pyx_r = __pyx_v_self->_value;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":996
 *     return b
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._value
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode = {"decode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoded), (&PyBytes_Type), 1, "encoded", 1))) __PYX_ERR(0, 996, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_8decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), ((PyObject*)__pyx_v_encoded));

  /* 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_6coders_10coder_impl_18SingletonCoderImpl_8decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":999
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return 0
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __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, __pyx_v_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, 999, __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, __pyx_v_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, 999, __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, 999, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 999, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1001
 *   def estimate_size(self, value, nested=False):
 *     # type: (Any, bool) -> int
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_0);
  __pyx_r = __pyx_int_0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":999
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 999, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 999, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 999, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_10estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_12__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._value,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->_value);
  __Pyx_GIVEREF(__pyx_v_self->_value);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_value);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._value,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._value,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._value is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._value,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._value is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->_value != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._value is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._value is not None
 *     if use_setstate:
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_SingletonCoderImp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235957399);
    __Pyx_GIVEREF(__pyx_int_235957399);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_235957399);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._value is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, None), state
 *     else:
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_SingletonCoderImp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_235957399);
    __Pyx_GIVEREF(__pyx_int_235957399);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_235957399);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_14__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SingletonCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1008
 * 
 *   CoderImpl for coders that are comprised of several component coders."""
 *   def __init__(self, coder_impls):             # <<<<<<<<<<<<<<
 *     for c in coder_impls:
 *       assert isinstance(c, CoderImpl), c
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_coder_impls = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coder_impls,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coder_impls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1008, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_coder_impls = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1008, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_coder_impls);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_coder_impls) {
  PyObject *__pyx_v_c = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1009
 *   CoderImpl for coders that are comprised of several component coders."""
 *   def __init__(self, coder_impls):
 *     for c in coder_impls:             # <<<<<<<<<<<<<<
 *       assert isinstance(c, CoderImpl), c
 *     self._coder_impls = tuple(coder_impls)
 */
  if (likely(PyList_CheckExact(__pyx_v_coder_impls)) || PyTuple_CheckExact(__pyx_v_coder_impls)) {
    __pyx_t_1 = __pyx_v_coder_impls; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_coder_impls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1009, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1009, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1009, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1009, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1009, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":1010
 *   def __init__(self, coder_impls):
 *     for c in coder_impls:
 *       assert isinstance(c, CoderImpl), c             # <<<<<<<<<<<<<<
 *     self._coder_impls = tuple(coder_impls)
 * 
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_c, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl); 
      if (unlikely(!(__pyx_t_5 != 0))) {
        __pyx_t_4 = PyTuple_Pack(1, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        PyErr_SetObject(PyExc_AssertionError, __pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 1010, __pyx_L1_error)
      }
    }
    #endif

    /* "apache_beam/coders/coder_impl.py":1009
 *   CoderImpl for coders that are comprised of several component coders."""
 *   def __init__(self, coder_impls):
 *     for c in coder_impls:             # <<<<<<<<<<<<<<
 *       assert isinstance(c, CoderImpl), c
 *     self._coder_impls = tuple(coder_impls)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1011
 *     for c in coder_impls:
 *       assert isinstance(c, CoderImpl), c
 *     self._coder_impls = tuple(coder_impls)             # <<<<<<<<<<<<<<
 * 
 *   def _extract_components(self, value):
 */
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_coder_impls); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_coder_impls);
  __Pyx_DECREF(__pyx_v_self->_coder_impls);
  __pyx_v_self->_coder_impls = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1008
 * 
 *   CoderImpl for coders that are comprised of several component coders."""
 *   def __init__(self, coder_impls):             # <<<<<<<<<<<<<<
 *     for c in coder_impls:
 *       assert isinstance(c, CoderImpl), c
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1013
 *     self._coder_impls = tuple(coder_impls)
 * 
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__extract_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_extract_components", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extract_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1014
 * 
 *   def _extract_components(self, value):
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def _construct_from_components(self, components):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 1014, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1013
 *     self._coder_impls = tuple(coder_impls)
 * 
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components = {"_extract_components", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_extract_components (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_2_extract_components(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_2_extract_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_extract_components", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__extract_components(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1016
 *     raise NotImplementedError
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__construct_from_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_components, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_components", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_components) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_components);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1017
 * 
 *   def _construct_from_components(self, components):
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 1017, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1016
 *     raise NotImplementedError
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components = {"_construct_from_components", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components(PyObject *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_construct_from_components (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_4_construct_from_components(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_components));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_4_construct_from_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_components", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__construct_from_components(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1019
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     values = self._extract_components(value)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_c = 0;
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1019, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1019, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1019, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1019, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1021
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (Any, create_OutputStream, bool) -> None
 *     values = self._extract_components(value)             # <<<<<<<<<<<<<<
 *     if len(self._coder_impls) != len(values):
 *       raise ValueError('Number of components does not match number of coders.')
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_extract_components(__pyx_v_self, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_values = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1022
 *     # type: (Any, create_OutputStream, bool) -> None
 *     values = self._extract_components(value)
 *     if len(self._coder_impls) != len(values):             # <<<<<<<<<<<<<<
 *       raise ValueError('Number of components does not match number of coders.')
 *     for i in range(0, len(self._coder_impls)):
 */
  __pyx_t_1 = __pyx_v_self->_coder_impls;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1022, __pyx_L1_error)
  }
  __pyx_t_8 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1022, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1022, __pyx_L1_error)
  __pyx_t_10 = ((__pyx_t_8 != __pyx_t_9) != 0);
  if (unlikely(__pyx_t_10)) {

    /* "apache_beam/coders/coder_impl.py":1023
 *     values = self._extract_components(value)
 *     if len(self._coder_impls) != len(values):
 *       raise ValueError('Number of components does not match number of coders.')             # <<<<<<<<<<<<<<
 *     for i in range(0, len(self._coder_impls)):
 *       c = self._coder_impls[i]  # type cast
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1023, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":1022
 *     # type: (Any, create_OutputStream, bool) -> None
 *     values = self._extract_components(value)
 *     if len(self._coder_impls) != len(values):             # <<<<<<<<<<<<<<
 *       raise ValueError('Number of components does not match number of coders.')
 *     for i in range(0, len(self._coder_impls)):
 */
  }

  /* "apache_beam/coders/coder_impl.py":1024
 *     if len(self._coder_impls) != len(values):
 *       raise ValueError('Number of components does not match number of coders.')
 *     for i in range(0, len(self._coder_impls)):             # <<<<<<<<<<<<<<
 *       c = self._coder_impls[i]  # type cast
 *       c.encode_to_stream(
 */
  __pyx_t_1 = __pyx_v_self->_coder_impls;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1024, __pyx_L1_error)
  }
  __pyx_t_9 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1024, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1024, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_9 >= 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_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1024, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_11(__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, 1024, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1025
 *       raise ValueError('Number of components does not match number of coders.')
 *     for i in range(0, len(self._coder_impls)):
 *       c = self._coder_impls[i]  # type cast             # <<<<<<<<<<<<<<
 *       c.encode_to_stream(
 *           values[i], out, nested or i + 1 < len(self._coder_impls))
 */
    if (unlikely(__pyx_v_self->_coder_impls == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1025, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_coder_impls, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __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_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1025, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_c, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1027
 *       c = self._coder_impls[i]  # type cast
 *       c.encode_to_stream(
 *           values[i], out, nested or i + 1 < len(self._coder_impls))             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = (__pyx_v_nested != 0);
    if (!__pyx_t_12) {
    } else {
      __pyx_t_10 = __pyx_t_12;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __pyx_v_self->_coder_impls;
    __Pyx_INCREF(__pyx_t_7);
    if (unlikely(__pyx_t_7 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1027, __pyx_L1_error)
    }
    __pyx_t_8 = PyTuple_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_10 = __pyx_t_12;
    __pyx_L6_bool_binop_done:;

    /* "apache_beam/coders/coder_impl.py":1026
 *     for i in range(0, len(self._coder_impls)):
 *       c = self._coder_impls[i]  # type cast
 *       c.encode_to_stream(             # <<<<<<<<<<<<<<
 *           values[i], out, nested or i + 1 < len(self._coder_impls))
 * 
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_c->__pyx_vtab)->encode_to_stream(__pyx_v_c, __pyx_t_1, __pyx_v_out, __pyx_t_10, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":1024
 *     if len(self._coder_impls) != len(values):
 *       raise ValueError('Number of components does not match number of coders.')
 *     for i in range(0, len(self._coder_impls)):             # <<<<<<<<<<<<<<
 *       c = self._coder_impls[i]  # type cast
 *       c.encode_to_stream(
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1019
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     values = self._extract_components(value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1019, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1019, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1019, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1019, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_6encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_6encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1029
 *           values[i], out, nested or i + 1 < len(self._coder_impls))
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._construct_from_components([
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_8genexpr3__pyx_v_i = NULL;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_8genexpr3__pyx_v_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __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_in_stream), __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, 1029, __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_in_stream), __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, 1029, __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, 1029, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1029, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1031
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> Any
 *     return self._construct_from_components([             # <<<<<<<<<<<<<<
 *         c.decode_from_stream(
 *             in_stream, nested or i + 1 < len(self._coder_impls)) for i,
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_2 = __pyx_int_0;

    /* "apache_beam/coders/coder_impl.py":1034
 *         c.decode_from_stream(
 *             in_stream, nested or i + 1 < len(self._coder_impls)) for i,
 *         c in enumerate(self._coder_impls)             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
    __pyx_t_4 = __pyx_v_self->_coder_impls; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
    for (;;) {
      if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1034, __pyx_L5_error)
      #else
      __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1034, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1034, __pyx_L5_error)
      __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_c, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":1033
 *     return self._construct_from_components([
 *         c.decode_from_stream(
 *             in_stream, nested or i + 1 < len(self._coder_impls)) for i,             # <<<<<<<<<<<<<<
 *         c in enumerate(self._coder_impls)
 *     ])
 */
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_i, __pyx_t_2);

      /* "apache_beam/coders/coder_impl.py":1034
 *         c.decode_from_stream(
 *             in_stream, nested or i + 1 < len(self._coder_impls)) for i,
 *         c in enumerate(self._coder_impls)             # <<<<<<<<<<<<<<
 *     ])
 * 
 */
      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1034, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2);
      __pyx_t_2 = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":1033
 *     return self._construct_from_components([
 *         c.decode_from_stream(
 *             in_stream, nested or i + 1 < len(self._coder_impls)) for i,             # <<<<<<<<<<<<<<
 *         c in enumerate(self._coder_impls)
 *     ])
 */
      __pyx_t_10 = (__pyx_v_nested != 0);
      if (!__pyx_t_10) {
      } else {
        __pyx_t_9 = __pyx_t_10;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_8genexpr3__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1033, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __pyx_v_self->_coder_impls;
      __Pyx_INCREF(__pyx_t_3);
      if (unlikely(__pyx_t_3 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 1033, __pyx_L5_error)
      }
      __pyx_t_11 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1033, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1033, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1033, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_9 = __pyx_t_10;
      __pyx_L8_bool_binop_done:;

      /* "apache_beam/coders/coder_impl.py":1032
 *     # type: (create_InputStream, bool) -> Any
 *     return self._construct_from_components([
 *         c.decode_from_stream(             # <<<<<<<<<<<<<<
 *             in_stream, nested or i + 1 < len(self._coder_impls)) for i,
 *         c in enumerate(self._coder_impls)
 */
      __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_8genexpr3__pyx_v_c->__pyx_vtab)->decode_from_stream(__pyx_8genexpr3__pyx_v_c, __pyx_v_in_stream, __pyx_t_9, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1032, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1031, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "apache_beam/coders/coder_impl.py":1033
 *     return self._construct_from_components([
 *         c.decode_from_stream(
 *             in_stream, nested or i + 1 < len(self._coder_impls)) for i,             # <<<<<<<<<<<<<<
 *         c in enumerate(self._coder_impls)
 *     ])
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF((PyObject *)__pyx_8genexpr3__pyx_v_c); __pyx_8genexpr3__pyx_v_c = 0;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_i); __pyx_8genexpr3__pyx_v_i = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF((PyObject *)__pyx_8genexpr3__pyx_v_c); __pyx_8genexpr3__pyx_v_c = 0;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_i); __pyx_8genexpr3__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */

  /* "apache_beam/coders/coder_impl.py":1031
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> Any
 *     return self._construct_from_components([             # <<<<<<<<<<<<<<
 *         c.decode_from_stream(
 *             in_stream, nested or i + 1 < len(self._coder_impls)) for i,
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_construct_from_components(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1029
 *           values[i], out, nested or i + 1 < len(self._coder_impls))
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._construct_from_components([
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_i);
  __Pyx_XDECREF((PyObject *)__pyx_8genexpr3__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1029, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1029, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1029, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1029, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1029, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_8decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_8decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1037
 *     ])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_estimated_size = NULL;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1037, __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, __pyx_v_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, 1037, __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, __pyx_v_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, 1037, __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, 1037, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 1037, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1042
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores sizes of observable components.
 *     estimated_size, _ = (self.get_estimated_size_and_observables(value))             # <<<<<<<<<<<<<<
 *     return estimated_size
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1042, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1042, __pyx_L1_error)
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1042, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_estimated_size = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v__ = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "apache_beam/coders/coder_impl.py":1043
 *     # TODO(ccy): This ignores sizes of observable components.
 *     estimated_size, _ = (self.get_estimated_size_and_observables(value))
 *     return estimated_size             # <<<<<<<<<<<<<<
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_estimated_size);
  __pyx_r = __pyx_v_estimated_size;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1037
 *     ])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_estimated_size);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size[] = "Estimates the encoded size of the given value, in bytes.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 1037, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1037, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1045
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_c = 0;
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_estimated_size = NULL;
  PyObject *__pyx_v_observables = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_child_size = NULL;
  PyObject *__pyx_v_child_observables = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1045, __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, __pyx_v_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, 1045, __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, __pyx_v_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, 1045, __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, 1045, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 1045, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1049
 * 
 *     """Returns estimated size of value along with any nested observables."""
 *     values = self._extract_components(value)             # <<<<<<<<<<<<<<
 *     estimated_size = 0
 *     observables = []  # type: Observables
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_extract_components(__pyx_v_self, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_values = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1050
 *     """Returns estimated size of value along with any nested observables."""
 *     values = self._extract_components(value)
 *     estimated_size = 0             # <<<<<<<<<<<<<<
 *     observables = []  # type: Observables
 *     for i in range(0, len(self._coder_impls)):
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_estimated_size = __pyx_int_0;

  /* "apache_beam/coders/coder_impl.py":1051
 *     values = self._extract_components(value)
 *     estimated_size = 0
 *     observables = []  # type: Observables             # <<<<<<<<<<<<<<
 *     for i in range(0, len(self._coder_impls)):
 *       c = self._coder_impls[i]  # type cast
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_observables = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1052
 *     estimated_size = 0
 *     observables = []  # type: Observables
 *     for i in range(0, len(self._coder_impls)):             # <<<<<<<<<<<<<<
 *       c = self._coder_impls[i]  # type cast
 *       child_size, child_observables = (
 */
  __pyx_t_1 = __pyx_v_self->_coder_impls;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1052, __pyx_L1_error)
  }
  __pyx_t_8 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_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, 1052, __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, 1052, __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, 1052, __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, 1052, __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, 1052, __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, 1052, __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, 1052, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1053
 *     observables = []  # type: Observables
 *     for i in range(0, len(self._coder_impls)):
 *       c = self._coder_impls[i]  # type cast             # <<<<<<<<<<<<<<
 *       child_size, child_observables = (
 *           c.get_estimated_size_and_observables(
 */
    if (unlikely(__pyx_v_self->_coder_impls == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1053, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_coder_impls, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __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_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1053, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_c, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1056
 *       child_size, child_observables = (
 *           c.get_estimated_size_and_observables(
 *               values[i], nested=nested or i + 1 < len(self._coder_impls)))             # <<<<<<<<<<<<<<
 *       estimated_size += child_size
 *       observables += child_observables
 */
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = (__pyx_v_nested != 0);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_10 = __pyx_t_11;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __pyx_v_self->_coder_impls;
    __Pyx_INCREF(__pyx_t_7);
    if (unlikely(__pyx_t_7 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 1056, __pyx_L1_error)
    }
    __pyx_t_12 = PyTuple_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1056, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1056, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_10 = __pyx_t_11;
    __pyx_L5_bool_binop_done:;

    /* "apache_beam/coders/coder_impl.py":1055
 *       c = self._coder_impls[i]  # type cast
 *       child_size, child_observables = (
 *           c.get_estimated_size_and_observables(             # <<<<<<<<<<<<<<
 *               values[i], nested=nested or i + 1 < len(self._coder_impls)))
 *       estimated_size += child_size
 */
    __pyx_t_13.__pyx_n = 1;
    __pyx_t_13.nested = __pyx_t_10;
    __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_c->__pyx_vtab)->get_estimated_size_and_observables(__pyx_v_c, __pyx_t_1, 0, &__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1054, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1054, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1054, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_7 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1054, __pyx_L1_error)
      __pyx_t_14 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_14 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1054, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }

    /* "apache_beam/coders/coder_impl.py":1054
 *     for i in range(0, len(self._coder_impls)):
 *       c = self._coder_impls[i]  # type cast
 *       child_size, child_observables = (             # <<<<<<<<<<<<<<
 *           c.get_estimated_size_and_observables(
 *               values[i], nested=nested or i + 1 < len(self._coder_impls)))
 */
    __Pyx_XDECREF_SET(__pyx_v_child_size, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_child_observables, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":1057
 *           c.get_estimated_size_and_observables(
 *               values[i], nested=nested or i + 1 < len(self._coder_impls)))
 *       estimated_size += child_size             # <<<<<<<<<<<<<<
 *       observables += child_observables
 *     return estimated_size, observables
 */
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_v_child_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":1058
 *               values[i], nested=nested or i + 1 < len(self._coder_impls)))
 *       estimated_size += child_size
 *       observables += child_observables             # <<<<<<<<<<<<<<
 *     return estimated_size, observables
 * 
 */
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_observables, __pyx_v_child_observables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_observables, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":1052
 *     estimated_size = 0
 *     observables = []  # type: Observables
 *     for i in range(0, len(self._coder_impls)):             # <<<<<<<<<<<<<<
 *       c = self._coder_impls[i]  # type cast
 *       child_size, child_observables = (
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1059
 *       estimated_size += child_size
 *       observables += child_observables
 *     return estimated_size, observables             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_estimated_size);
  __Pyx_GIVEREF(__pyx_v_estimated_size);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_estimated_size);
  __Pyx_INCREF(__pyx_v_observables);
  __Pyx_GIVEREF(__pyx_v_observables);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_observables);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1045
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_estimated_size);
  __Pyx_XDECREF(__pyx_v_observables);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_child_size);
  __Pyx_XDECREF(__pyx_v_child_observables);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables[] = "Returns estimated size of value along with any nested observables.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_estimated_size_and_observables") < 0)) __PYX_ERR(0, 1045, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1045, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1045, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_12get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__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_6coders_10coder_impl_26AbstractComponentCoderImpl_14__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_14__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._coder_impls,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->_coder_impls);
  __Pyx_GIVEREF(__pyx_v_self->_coder_impls);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_coder_impls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._coder_impls,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._coder_impls,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._coder_impls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._coder_impls,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._coder_impls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->_coder_impls != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._coder_impls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._coder_impls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_AbstractComponent); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_90923958);
    __Pyx_GIVEREF(__pyx_int_90923958);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_90923958);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._coder_impls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, None), state
 *     else:
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_AbstractComponent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_90923958);
    __Pyx_GIVEREF(__pyx_int_90923958);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_90923958);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__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_6coders_10coder_impl_26AbstractComponentCoderImpl_16__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_16__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AbstractComponentCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1064
 * class AvroCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema):             # <<<<<<<<<<<<<<
 *     self.parsed_schema = parse_schema(json.loads(schema))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_schema = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_schema,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_schema)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1064, __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, 1064, __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_schema = 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, 1064, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_schema);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1065
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema):
 *     self.parsed_schema = parse_schema(json.loads(schema))             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_parse_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_loads); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_schema);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parsed_schema, __pyx_t_1) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1064
 * class AvroCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema):             # <<<<<<<<<<<<<<
 *     self.parsed_schema = parse_schema(json.loads(schema))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1067
 *     self.parsed_schema = parse_schema(json.loads(schema))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert issubclass(type(value), AvroRecord)
 *     with BytesIO() as buf:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode = {"encode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, 1); __PYX_ERR(0, 1067, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode") < 0)) __PYX_ERR(0, 1067, __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_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1067, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_2encode(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_2encode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_buf = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  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;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode", 0);

  /* "apache_beam/coders/coder_impl.py":1068
 * 
 *   def encode(self, value):
 *     assert issubclass(type(value), AvroRecord)             # <<<<<<<<<<<<<<
 *     with BytesIO() as buf:
 *       schemaless_writer(buf, self.parsed_schema, value.record)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_AvroRecord); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_IsSubclass(((PyObject *)Py_TYPE(__pyx_v_value)), __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1068, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!(__pyx_t_2 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1068, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/coders/coder_impl.py":1069
 *   def encode(self, value):
 *     assert issubclass(type(value), AvroRecord)
 *     with BytesIO() as buf:             # <<<<<<<<<<<<<<
 *       schemaless_writer(buf, self.parsed_schema, value.record)
 *       return buf.getvalue()
 */
  /*with:*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_BytesIO); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1069, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {
          __pyx_v_buf = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "apache_beam/coders/coder_impl.py":1070
 *     assert issubclass(type(value), AvroRecord)
 *     with BytesIO() as buf:
 *       schemaless_writer(buf, self.parsed_schema, value.record)             # <<<<<<<<<<<<<<
 *       return buf.getvalue()
 * 
 */
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_schemaless_writer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parsed_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_record); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = NULL;
          __pyx_t_11 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
              __pyx_t_11 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_buf, __pyx_t_3, __pyx_t_6};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1070, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_buf, __pyx_t_3, __pyx_t_6};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1070, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else
          #endif
          {
            __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1070, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_12);
            if (__pyx_t_10) {
              __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
            }
            __Pyx_INCREF(__pyx_v_buf);
            __Pyx_GIVEREF(__pyx_v_buf);
            PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_buf);
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_6);
            PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_6);
            __pyx_t_3 = 0;
            __pyx_t_6 = 0;
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1070, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "apache_beam/coders/coder_impl.py":1071
 *     with BytesIO() as buf:
 *       schemaless_writer(buf, self.parsed_schema, value.record)
 *       return buf.getvalue()             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_buf, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_12 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_12)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
            }
          }
          __pyx_t_4 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L7_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_L11_try_return;

          /* "apache_beam/coders/coder_impl.py":1069
 *   def encode(self, value):
 *     assert issubclass(type(value), AvroRecord)
 *     with BytesIO() as buf:             # <<<<<<<<<<<<<<
 *       schemaless_writer(buf, self.parsed_schema, value.record)
 *       return buf.getvalue()
 */
        }
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_12) < 0) __PYX_ERR(0, 1069, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_6 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1069, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1069, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_2 < 0) __PYX_ERR(0, 1069, __pyx_L9_except_error)
          __pyx_t_14 = ((!(__pyx_t_2 != 0)) != 0);
          if (__pyx_t_14) {
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_12);
            __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_1, __pyx_t_12);
            __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_12 = 0; 
            __PYX_ERR(0, 1069, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L11_try_return:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L4_return;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__9, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1069, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L4_return: {
        __pyx_t_9 = __pyx_r;
        __pyx_r = 0;
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__9, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1069, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __pyx_r = __pyx_t_9;
        __pyx_t_9 = 0;
        goto __pyx_L0;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "apache_beam/coders/coder_impl.py":1067
 *     self.parsed_schema = parse_schema(json.loads(schema))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert issubclass(type(value), AvroRecord)
 *     with BytesIO() as buf:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.encode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1073
 *       return buf.getvalue()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     with BytesIO(encoded) as buf:
 *       return AvroRecord(schemaless_reader(buf, self.parsed_schema))
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode = {"decode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_encoded = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_encoded,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_encoded)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, 1); __PYX_ERR(0, 1073, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode") < 0)) __PYX_ERR(0, 1073, __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_encoded = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1073, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_4decode(__pyx_self, __pyx_v_self, __pyx_v_encoded);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_4decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_v_buf = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  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;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode", 0);

  /* "apache_beam/coders/coder_impl.py":1074
 * 
 *   def decode(self, encoded):
 *     with BytesIO(encoded) as buf:             # <<<<<<<<<<<<<<
 *       return AvroRecord(schemaless_reader(buf, self.parsed_schema))
 * 
 */
  /*with:*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_BytesIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_encoded) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_encoded);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1074, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __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:*/ {
          __pyx_v_buf = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "apache_beam/coders/coder_impl.py":1075
 *   def decode(self, encoded):
 *     with BytesIO(encoded) as buf:
 *       return AvroRecord(schemaless_reader(buf, self.parsed_schema))             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_AvroRecord); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_schemaless_reader); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1075, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parsed_schema); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1075, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = NULL;
          __pyx_t_11 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
              __pyx_t_11 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_buf, __pyx_t_9};
            __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
            PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_buf, __pyx_t_9};
            __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          } else
          #endif
          {
            __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1075, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_12);
            if (__pyx_t_10) {
              __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
            }
            __Pyx_INCREF(__pyx_v_buf);
            __Pyx_GIVEREF(__pyx_v_buf);
            PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_buf);
            __Pyx_GIVEREF(__pyx_t_9);
            PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_9);
            __pyx_t_9 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          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_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L7_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_L11_try_return;

          /* "apache_beam/coders/coder_impl.py":1074
 * 
 *   def decode(self, encoded):
 *     with BytesIO(encoded) as buf:             # <<<<<<<<<<<<<<
 *       return AvroRecord(schemaless_reader(buf, self.parsed_schema))
 * 
 */
        }
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 1074, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1074, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1074, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (__pyx_t_14 < 0) __PYX_ERR(0, 1074, __pyx_L9_except_error)
          __pyx_t_15 = ((!(__pyx_t_14 != 0)) != 0);
          if (__pyx_t_15) {
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_2);
            __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_1, __pyx_t_2);
            __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; 
            __PYX_ERR(0, 1074, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L11_try_return:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L4_return;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_4) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__9, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1074, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L4_return: {
        __pyx_t_8 = __pyx_r;
        __pyx_r = 0;
        if (__pyx_t_4) {
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__9, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1074, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        goto __pyx_L0;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "apache_beam/coders/coder_impl.py":1073
 *       return buf.getvalue()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     with BytesIO(encoded) as buf:
 *       return AvroRecord(schemaless_reader(buf, self.parsed_schema))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.AvroCoderImpl.decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1080
 * class TupleCoderImpl(AbstractComponentCoderImpl):
 *   """A coder for tuple objects."""
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     return tuple(value)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_extract_components", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extract_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1081
 *   """A coder for tuple objects."""
 *   def _extract_components(self, value):
 *     return tuple(value)             # <<<<<<<<<<<<<<
 * 
 *   def _construct_from_components(self, components):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1080
 * class TupleCoderImpl(AbstractComponentCoderImpl):
 *   """A coder for tuple objects."""
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     return tuple(value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components = {"_extract_components", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_extract_components (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_extract_components", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._extract_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1083
 *     return tuple(value)
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__construct_from_components(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_components", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_components) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_components);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1084
 * 
 *   def _construct_from_components(self, components):
 *     return tuple(components)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1083
 *     return tuple(value)
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components = {"_construct_from_components", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components(PyObject *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_construct_from_components (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_2_construct_from_components(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_components));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_2_construct_from_components(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_components", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__construct_from_components(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl._construct_from_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._coder_impls,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._coder_impls);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._coder_impls);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base._coder_impls);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._coder_impls,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._coder_impls,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._coder_impls is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._coder_impls,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._coder_impls is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->__pyx_base._coder_impls != ((PyObject*)Py_None));
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._coder_impls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._coder_impls is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_TupleCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_90923958);
    __Pyx_GIVEREF(__pyx_int_90923958);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_90923958);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._coder_impls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, None), state
 *     else:
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_TupleCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_90923958);
    __Pyx_GIVEREF(__pyx_int_90923958);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_90923958);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1088
 * 
 * class _ConcatSequence(object):
 *   def __init__(self, head, tail):             # <<<<<<<<<<<<<<
 *     # type: (Iterable[Any], Iterable[Any]) -> None
 *     self._head = head
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_head = 0;
  PyObject *__pyx_v_tail = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_head,&__pyx_n_s_tail,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_head)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1088, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tail)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1088, __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, 1088, __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_head = values[1];
    __pyx_v_tail = 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, 1088, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence___init__(__pyx_self, __pyx_v_self, __pyx_v_head, __pyx_v_tail);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_head, PyObject *__pyx_v_tail) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1090
 *   def __init__(self, head, tail):
 *     # type: (Iterable[Any], Iterable[Any]) -> None
 *     self._head = head             # <<<<<<<<<<<<<<
 *     self._tail = tail
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_head_2, __pyx_v_head) < 0) __PYX_ERR(0, 1090, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1091
 *     # type: (Iterable[Any], Iterable[Any]) -> None
 *     self._head = head
 *     self._tail = tail             # <<<<<<<<<<<<<<
 * 
 *   def __iter__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tail_2, __pyx_v_tail) < 0) __PYX_ERR(0, 1091, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1088
 * 
 * class _ConcatSequence(object):
 *   def __init__(self, head, tail):             # <<<<<<<<<<<<<<
 *     # type: (Iterable[Any], Iterable[Any]) -> None
 *     self._head = head
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_15_ConcatSequence_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/coders/coder_impl.py":1093
 *     self._tail = tail
 * 
 *   def __iter__(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Iterator[Any]
 *     for elem in self._head:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__ = {"__iter__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_2__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__(__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1093, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_15_ConcatSequence_4generator1, __pyx_codeobj__10, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_ConcatSequence___iter, __pyx_n_s_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1093, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_15_ConcatSequence_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    case 2: goto __pyx_L9_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1093, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1095
 *   def __iter__(self):
 *     # type: () -> Iterator[Any]
 *     for elem in self._head:             # <<<<<<<<<<<<<<
 *       yield elem
 *     for elem in self._tail:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_head_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1095, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1095, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1095, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elem);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elem, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1096
 *     # type: () -> Iterator[Any]
 *     for elem in self._head:
 *       yield elem             # <<<<<<<<<<<<<<
 *     for elem in self._tail:
 *       yield elem
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem);
    __pyx_r = __pyx_cur_scope->__pyx_v_elem;
    __Pyx_XGIVEREF(__pyx_t_2);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1096, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":1095
 *   def __iter__(self):
 *     # type: () -> Iterator[Any]
 *     for elem in self._head:             # <<<<<<<<<<<<<<
 *       yield elem
 *     for elem in self._tail:
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1097
 *     for elem in self._head:
 *       yield elem
 *     for elem in self._tail:             # <<<<<<<<<<<<<<
 *       yield elem
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_tail_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1097, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1097, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1097, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1097, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elem);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elem, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":1098
 *       yield elem
 *     for elem in self._tail:
 *       yield elem             # <<<<<<<<<<<<<<
 * 
 *   def __eq__(self, other):
 */
    __Pyx_INCREF(__pyx_cur_scope->__pyx_v_elem);
    __pyx_r = __pyx_cur_scope->__pyx_v_elem;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 2;
    return __pyx_r;
    __pyx_L9_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1098, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":1097
 *     for elem in self._head:
 *       yield elem
 *     for elem in self._tail:             # <<<<<<<<<<<<<<
 *       yield elem
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "apache_beam/coders/coder_impl.py":1093
 *     self._tail = tail
 * 
 *   def __iter__(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Iterator[Any]
 *     for elem in self._head:
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1100
 *       yield elem
 * 
 *   def __eq__(self, other):             # <<<<<<<<<<<<<<
 *     return list(self) == list(other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__ = {"__eq__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_other = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, 1); __PYX_ERR(0, 1100, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__eq__") < 0)) __PYX_ERR(0, 1100, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_other = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1100, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_5__eq__(__pyx_self, __pyx_v_self, __pyx_v_other);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_5__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "apache_beam/coders/coder_impl.py":1101
 * 
 *   def __eq__(self, other):
 *     return list(self) == list(other)             # <<<<<<<<<<<<<<
 * 
 *   def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PySequence_List(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1100
 *       yield elem
 * 
 *   def __eq__(self, other):             # <<<<<<<<<<<<<<
 *     return list(self) == list(other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1103
 *     return list(self) == list(other)
 * 
 *   def __hash__(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__ = {"__hash__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_7__hash__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_7__hash__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "apache_beam/coders/coder_impl.py":1104
 * 
 *   def __hash__(self):
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def __reduce__(self):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 1104, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1103
 *     return list(self) == list(other)
 * 
 *   def __hash__(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1106
 *     raise NotImplementedError
 * 
 *   def __reduce__(self):             # <<<<<<<<<<<<<<
 *     return list, (list(self), )
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__ = {"__reduce__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_9__reduce__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_15_ConcatSequence_9__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "apache_beam/coders/coder_impl.py":1107
 * 
 *   def __reduce__(self):
 *     return list, (list(self), )             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __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 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyList_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyList_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyList_Type)));
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1106
 *     raise NotImplementedError
 * 
 *   def __reduce__(self):             # <<<<<<<<<<<<<<
 *     return list, (list(self), )
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._ConcatSequence.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1149
 *   _DEFAULT_BUFFER_SIZE = 64 * 1024
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       elem_coder,  # type: CoderImpl
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_elem_coder = 0;
  PyObject *__pyx_v_read_state = 0;
  PyObject *__pyx_v_write_state = 0;
  PyObject *__pyx_v_write_state_threshold = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elem_coder,&__pyx_n_s_read_state,&__pyx_n_s_write_state,&__pyx_n_s_write_state_threshold,0};
    PyObject* values[4] = {0,0,0,0};

    /* "apache_beam/coders/coder_impl.py":1152
 *       self,
 *       elem_coder,  # type: CoderImpl
 *       read_state=None,  # type: Optional[IterableStateReader]             # <<<<<<<<<<<<<<
 *       write_state=None,  # type: Optional[IterableStateWriter]
 *       write_state_threshold=0  # type: int
 */
    values[1] = ((PyObject *)Py_None);

    /* "apache_beam/coders/coder_impl.py":1153
 *       elem_coder,  # type: CoderImpl
 *       read_state=None,  # type: Optional[IterableStateReader]
 *       write_state=None,  # type: Optional[IterableStateWriter]             # <<<<<<<<<<<<<<
 *       write_state_threshold=0  # type: int
 *   ):
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = ((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  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_elem_coder)) != 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_read_state);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_write_state);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_write_state_threshold);
          if (value) { values[3] = 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, 1149, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_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);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_elem_coder = values[0];
    __pyx_v_read_state = values[1];
    __pyx_v_write_state = values[2];
    __pyx_v_write_state_threshold = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_elem_coder, __pyx_v_read_state, __pyx_v_write_state, __pyx_v_write_state_threshold);

  /* "apache_beam/coders/coder_impl.py":1149
 *   _DEFAULT_BUFFER_SIZE = 64 * 1024
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       elem_coder,  # type: CoderImpl
 */

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_elem_coder, PyObject *__pyx_v_read_state, PyObject *__pyx_v_write_state, PyObject *__pyx_v_write_state_threshold) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1156
 *       write_state_threshold=0  # type: int
 *   ):
 *     self._elem_coder = elem_coder             # <<<<<<<<<<<<<<
 *     self._read_state = read_state
 *     self._write_state = write_state
 */
  if (!(likely(((__pyx_v_elem_coder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_elem_coder, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1156, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_elem_coder;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_elem_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_elem_coder));
  __pyx_v_self->_elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1157
 *   ):
 *     self._elem_coder = elem_coder
 *     self._read_state = read_state             # <<<<<<<<<<<<<<
 *     self._write_state = write_state
 *     self._write_state_threshold = write_state_threshold
 */
  __Pyx_INCREF(__pyx_v_read_state);
  __Pyx_GIVEREF(__pyx_v_read_state);
  __Pyx_GOTREF(__pyx_v_self->_read_state);
  __Pyx_DECREF(__pyx_v_self->_read_state);
  __pyx_v_self->_read_state = __pyx_v_read_state;

  /* "apache_beam/coders/coder_impl.py":1158
 *     self._elem_coder = elem_coder
 *     self._read_state = read_state
 *     self._write_state = write_state             # <<<<<<<<<<<<<<
 *     self._write_state_threshold = write_state_threshold
 * 
 */
  __Pyx_INCREF(__pyx_v_write_state);
  __Pyx_GIVEREF(__pyx_v_write_state);
  __Pyx_GOTREF(__pyx_v_self->_write_state);
  __Pyx_DECREF(__pyx_v_self->_write_state);
  __pyx_v_self->_write_state = __pyx_v_write_state;

  /* "apache_beam/coders/coder_impl.py":1159
 *     self._read_state = read_state
 *     self._write_state = write_state
 *     self._write_state_threshold = write_state_threshold             # <<<<<<<<<<<<<<
 * 
 *   def _construct_from_sequence(self, values):
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_write_state_threshold); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1159, __pyx_L1_error)
  __pyx_v_self->_write_state_threshold = __pyx_t_2;

  /* "apache_beam/coders/coder_impl.py":1149
 *   _DEFAULT_BUFFER_SIZE = 64 * 1024
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       elem_coder,  # type: CoderImpl
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1161
 *     self._write_state_threshold = write_state_threshold
 * 
 *   def _construct_from_sequence(self, values):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_sequence", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_values) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_values);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1162
 * 
 *   def _construct_from_sequence(self, values):
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 1162, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1161
 *     self._write_state_threshold = write_state_threshold
 * 
 *   def _construct_from_sequence(self, values):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence = {"_construct_from_sequence", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_construct_from_sequence (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_2_construct_from_sequence(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_values));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_2_construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_sequence", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl__construct_from_sequence(__pyx_v_self, __pyx_v_values, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1164
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Sequence, create_OutputStream, bool) -> None
 *     # Compatible with Java's IterableLikeCoder.
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_buffer = 0;
  int64_t __pyx_v_target_buffer_size;
  int64_t __pyx_v_index;
  int64_t __pyx_v_prev_index;
  PyObject *__pyx_v_elem = NULL;
  PyObject *__pyx_v_value_iter = NULL;
  PyObject *__pyx_v_start_size = NULL;
  PyObject *__pyx_v_tail = NULL;
  PyObject *__pyx_v_state_token = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  int64_t __pyx_t_13;
  size_t __pyx_t_14;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1164, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1164, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1164, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1167
 *     # type: (Sequence, create_OutputStream, bool) -> None
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__') and self._write_state is None:             # <<<<<<<<<<<<<<
 *       out.write_bigendian_int32(len(value))
 *       for elem in value:
 */
  __pyx_t_9 = __Pyx_HasAttr(__pyx_v_value, __pyx_n_u_len); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1167, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {
  } else {
    __pyx_t_8 = __pyx_t_10;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_10 = (__pyx_v_self->_write_state == Py_None);
  __pyx_t_9 = (__pyx_t_10 != 0);
  __pyx_t_8 = __pyx_t_9;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":1168
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__') and self._write_state is None:
 *       out.write_bigendian_int32(len(value))             # <<<<<<<<<<<<<<
 *       for elem in value:
 *         self._elem_coder.encode_to_stream(elem, out, True)
 */
    __pyx_t_11 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1168, __pyx_L1_error)
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int32(__pyx_v_out, __pyx_t_11, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1169
 *     if hasattr(value, '__len__') and self._write_state is None:
 *       out.write_bigendian_int32(len(value))
 *       for elem in value:             # <<<<<<<<<<<<<<
 *         self._elem_coder.encode_to_stream(elem, out, True)
 *     else:
 */
    if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
      __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1169, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1169, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_11 >= 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_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1169, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1169, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1169, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1169, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1169, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":1170
 *       out.write_bigendian_int32(len(value))
 *       for elem in value:
 *         self._elem_coder.encode_to_stream(elem, out, True)             # <<<<<<<<<<<<<<
 *     else:
 *       # We don't know the size without traversing it so use a fixed size buffer
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_elem_coder, __pyx_v_elem, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":1169
 *     if hasattr(value, '__len__') and self._write_state is None:
 *       out.write_bigendian_int32(len(value))
 *       for elem in value:             # <<<<<<<<<<<<<<
 *         self._elem_coder.encode_to_stream(elem, out, True)
 *     else:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1167
 *     # type: (Sequence, create_OutputStream, bool) -> None
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__') and self._write_state is None:             # <<<<<<<<<<<<<<
 *       out.write_bigendian_int32(len(value))
 *       for elem in value:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1177
 * 
 *       # -1 to indicate that the length is not known.
 *       out.write_bigendian_int32(-1)             # <<<<<<<<<<<<<<
 *       buffer = create_OutputStream()
 *       if self._write_state is None:
 */
  /*else*/ {
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int32(__pyx_v_out, -1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1178
 *       # -1 to indicate that the length is not known.
 *       out.write_bigendian_int32(-1)
 *       buffer = create_OutputStream()             # <<<<<<<<<<<<<<
 *       if self._write_state is None:
 *         target_buffer_size = self._DEFAULT_BUFFER_SIZE
 */
    __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream);
    __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __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_6coders_6stream_OutputStream))))) __PYX_ERR(0, 1178, __pyx_L1_error)
    __pyx_v_buffer = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1179
 *       out.write_bigendian_int32(-1)
 *       buffer = create_OutputStream()
 *       if self._write_state is None:             # <<<<<<<<<<<<<<
 *         target_buffer_size = self._DEFAULT_BUFFER_SIZE
 *       else:
 */
    __pyx_t_8 = (__pyx_v_self->_write_state == Py_None);
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":1180
 *       buffer = create_OutputStream()
 *       if self._write_state is None:
 *         target_buffer_size = self._DEFAULT_BUFFER_SIZE             # <<<<<<<<<<<<<<
 *       else:
 *         target_buffer_size = min(
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DEFAULT_BUFFER_SIZE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_13 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_13 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1180, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_target_buffer_size = __pyx_t_13;

      /* "apache_beam/coders/coder_impl.py":1179
 *       out.write_bigendian_int32(-1)
 *       buffer = create_OutputStream()
 *       if self._write_state is None:             # <<<<<<<<<<<<<<
 *         target_buffer_size = self._DEFAULT_BUFFER_SIZE
 *       else:
 */
      goto __pyx_L8;
    }

    /* "apache_beam/coders/coder_impl.py":1182
 *         target_buffer_size = self._DEFAULT_BUFFER_SIZE
 *       else:
 *         target_buffer_size = min(             # <<<<<<<<<<<<<<
 *             self._DEFAULT_BUFFER_SIZE, self._write_state_threshold)
 *       prev_index = index = -1
 */
    /*else*/ {

      /* "apache_beam/coders/coder_impl.py":1183
 *       else:
 *         target_buffer_size = min(
 *             self._DEFAULT_BUFFER_SIZE, self._write_state_threshold)             # <<<<<<<<<<<<<<
 *       prev_index = index = -1
 *       # Don't want to miss out on fast list iteration optimization.
 */
      __pyx_t_6 = __pyx_v_self->_write_state_threshold;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DEFAULT_BUFFER_SIZE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1183, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1183, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_9) {
        __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1183, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_2 = __pyx_t_7;
        __pyx_t_7 = 0;
      } else {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = __pyx_t_1;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_13 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_target_buffer_size = __pyx_t_13;
    }
    __pyx_L8:;

    /* "apache_beam/coders/coder_impl.py":1184
 *         target_buffer_size = min(
 *             self._DEFAULT_BUFFER_SIZE, self._write_state_threshold)
 *       prev_index = index = -1             # <<<<<<<<<<<<<<
 *       # Don't want to miss out on fast list iteration optimization.
 *       value_iter = value if isinstance(value, (list, tuple)) else iter(value)
 */
    __pyx_v_prev_index = -1L;
    __pyx_v_index = -1L;

    /* "apache_beam/coders/coder_impl.py":1186
 *       prev_index = index = -1
 *       # Don't want to miss out on fast list iteration optimization.
 *       value_iter = value if isinstance(value, (list, tuple)) else iter(value)             # <<<<<<<<<<<<<<
 *       start_size = out.size()
 *       for elem in value_iter:
 */
    __pyx_t_8 = PyList_Check(__pyx_v_value); 
    __pyx_t_10 = (__pyx_t_8 != 0);
    if (!__pyx_t_10) {
    } else {
      __pyx_t_9 = __pyx_t_10;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_10 = PyTuple_Check(__pyx_v_value); 
    __pyx_t_8 = (__pyx_t_10 != 0);
    __pyx_t_9 = __pyx_t_8;
    __pyx_L9_bool_binop_done:;
    if ((__pyx_t_9 != 0)) {
      __Pyx_INCREF(__pyx_v_value);
      __pyx_t_2 = __pyx_v_value;
    } else {
      __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_t_1;
      __pyx_t_1 = 0;
    }
    __pyx_v_value_iter = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":1187
 *       # Don't want to miss out on fast list iteration optimization.
 *       value_iter = value if isinstance(value, (list, tuple)) else iter(value)
 *       start_size = out.size()             # <<<<<<<<<<<<<<
 *       for elem in value_iter:
 *         index += 1
 */
    __pyx_t_14 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->size(__pyx_v_out, 0); if (unlikely(__pyx_t_14 == ((size_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_start_size = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":1188
 *       value_iter = value if isinstance(value, (list, tuple)) else iter(value)
 *       start_size = out.size()
 *       for elem in value_iter:             # <<<<<<<<<<<<<<
 *         index += 1
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 */
    if (likely(PyList_CheckExact(__pyx_v_value_iter)) || PyTuple_CheckExact(__pyx_v_value_iter)) {
      __pyx_t_2 = __pyx_v_value_iter; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value_iter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1188, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_11 >= 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_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1188, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_11 >= 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_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1188, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_12(__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, 1188, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1189
 *       start_size = out.size()
 *       for elem in value_iter:
 *         index += 1             # <<<<<<<<<<<<<<
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 *         if buffer.size() > target_buffer_size:
 */
      __pyx_v_index = (__pyx_v_index + 1);

      /* "apache_beam/coders/coder_impl.py":1190
 *       for elem in value_iter:
 *         index += 1
 *         self._elem_coder.encode_to_stream(elem, buffer, True)             # <<<<<<<<<<<<<<
 *         if buffer.size() > target_buffer_size:
 *           out.write_var_int64(index - prev_index)
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_elem_coder, __pyx_v_elem, __pyx_v_buffer, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1191
 *         index += 1
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 *         if buffer.size() > target_buffer_size:             # <<<<<<<<<<<<<<
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())
 */
      __pyx_t_14 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_buffer->__pyx_vtab)->size(__pyx_v_buffer, 0); if (unlikely(__pyx_t_14 == ((size_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1191, __pyx_L1_error)
      __pyx_t_9 = ((__pyx_t_14 > __pyx_v_target_buffer_size) != 0);
      if (__pyx_t_9) {

        /* "apache_beam/coders/coder_impl.py":1192
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 *         if buffer.size() > target_buffer_size:
 *           out.write_var_int64(index - prev_index)             # <<<<<<<<<<<<<<
 *           out.write(buffer.get())
 *           prev_index = index
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, (__pyx_v_index - __pyx_v_prev_index), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "apache_beam/coders/coder_impl.py":1193
 *         if buffer.size() > target_buffer_size:
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())             # <<<<<<<<<<<<<<
 *           prev_index = index
 *           buffer = create_OutputStream()
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_buffer->__pyx_vtab)->get(__pyx_v_buffer, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_t_1), 0, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "apache_beam/coders/coder_impl.py":1194
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())
 *           prev_index = index             # <<<<<<<<<<<<<<
 *           buffer = create_OutputStream()
 *           if (self._write_state is not None and
 */
        __pyx_v_prev_index = __pyx_v_index;

        /* "apache_beam/coders/coder_impl.py":1195
 *           out.write(buffer.get())
 *           prev_index = index
 *           buffer = create_OutputStream()             # <<<<<<<<<<<<<<
 *           if (self._write_state is not None and
 *               out.size() - start_size > self._write_state_threshold):
 */
        __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream);
        __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; __pyx_t_4 = NULL;
        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_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 1195, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_buffer, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "apache_beam/coders/coder_impl.py":1196
 *           prev_index = index
 *           buffer = create_OutputStream()
 *           if (self._write_state is not None and             # <<<<<<<<<<<<<<
 *               out.size() - start_size > self._write_state_threshold):
 *             tail = (
 */
        __pyx_t_8 = (__pyx_v_self->_write_state != Py_None);
        __pyx_t_10 = (__pyx_t_8 != 0);
        if (__pyx_t_10) {
        } else {
          __pyx_t_9 = __pyx_t_10;
          goto __pyx_L15_bool_binop_done;
        }

        /* "apache_beam/coders/coder_impl.py":1197
 *           buffer = create_OutputStream()
 *           if (self._write_state is not None and
 *               out.size() - start_size > self._write_state_threshold):             # <<<<<<<<<<<<<<
 *             tail = (
 *                 value_iter[index +
 */
        __pyx_t_14 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->size(__pyx_v_out, 0); if (unlikely(__pyx_t_14 == ((size_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1197, __pyx_L1_error)
        __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = PyNumber_Subtract(__pyx_t_7, __pyx_v_start_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->_write_state_threshold); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1197, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1197, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_9 = __pyx_t_10;
        __pyx_L15_bool_binop_done:;

        /* "apache_beam/coders/coder_impl.py":1196
 *           prev_index = index
 *           buffer = create_OutputStream()
 *           if (self._write_state is not None and             # <<<<<<<<<<<<<<
 *               out.size() - start_size > self._write_state_threshold):
 *             tail = (
 */
        if (__pyx_t_9) {

          /* "apache_beam/coders/coder_impl.py":1201
 *                 value_iter[index +
 *                            1:] if isinstance(value_iter,
 *                                              (list, tuple)) else value_iter)             # <<<<<<<<<<<<<<
 *             state_token = self._write_state(tail, self._elem_coder)
 *             out.write_var_int64(-1)
 */
          __pyx_t_10 = PyList_Check(__pyx_v_value_iter); 
          __pyx_t_8 = (__pyx_t_10 != 0);
          if (!__pyx_t_8) {
          } else {
            __pyx_t_9 = __pyx_t_8;
            goto __pyx_L17_bool_binop_done;
          }

          /* "apache_beam/coders/coder_impl.py":1200
 *             tail = (
 *                 value_iter[index +
 *                            1:] if isinstance(value_iter,             # <<<<<<<<<<<<<<
 *                                              (list, tuple)) else value_iter)
 *             state_token = self._write_state(tail, self._elem_coder)
 */
          __pyx_t_8 = PyTuple_Check(__pyx_v_value_iter); 

          /* "apache_beam/coders/coder_impl.py":1201
 *                 value_iter[index +
 *                            1:] if isinstance(value_iter,
 *                                              (list, tuple)) else value_iter)             # <<<<<<<<<<<<<<
 *             state_token = self._write_state(tail, self._elem_coder)
 *             out.write_var_int64(-1)
 */
          __pyx_t_10 = (__pyx_t_8 != 0);
          __pyx_t_9 = __pyx_t_10;
          __pyx_L17_bool_binop_done:;

          /* "apache_beam/coders/coder_impl.py":1200
 *             tail = (
 *                 value_iter[index +
 *                            1:] if isinstance(value_iter,             # <<<<<<<<<<<<<<
 *                                              (list, tuple)) else value_iter)
 *             state_token = self._write_state(tail, self._elem_coder)
 */
          if ((__pyx_t_9 != 0)) {

            /* "apache_beam/coders/coder_impl.py":1199
 *               out.size() - start_size > self._write_state_threshold):
 *             tail = (
 *                 value_iter[index +             # <<<<<<<<<<<<<<
 *                            1:] if isinstance(value_iter,
 *                                              (list, tuple)) else value_iter)
 */
            __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_value_iter, (__pyx_v_index + 1), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1199, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_4 = __pyx_t_7;
            __pyx_t_7 = 0;
          } else {

            /* "apache_beam/coders/coder_impl.py":1201
 *                 value_iter[index +
 *                            1:] if isinstance(value_iter,
 *                                              (list, tuple)) else value_iter)             # <<<<<<<<<<<<<<
 *             state_token = self._write_state(tail, self._elem_coder)
 *             out.write_var_int64(-1)
 */
            __Pyx_INCREF(__pyx_v_value_iter);
            __pyx_t_4 = __pyx_v_value_iter;
          }
          __pyx_v_tail = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "apache_beam/coders/coder_impl.py":1202
 *                            1:] if isinstance(value_iter,
 *                                              (list, tuple)) else value_iter)
 *             state_token = self._write_state(tail, self._elem_coder)             # <<<<<<<<<<<<<<
 *             out.write_var_int64(-1)
 *             out.write(state_token, True)
 */
          __Pyx_INCREF(__pyx_v_self->_write_state);
          __pyx_t_7 = __pyx_v_self->_write_state; __pyx_t_1 = NULL;
          __pyx_t_6 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
              __pyx_t_6 = 1;
            }
          }
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_tail, ((PyObject *)__pyx_v_self->_elem_coder)};
            __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __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_7)) {
            PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_tail, ((PyObject *)__pyx_v_self->_elem_coder)};
            __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __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, 1202, __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_tail);
            __Pyx_GIVEREF(__pyx_v_tail);
            PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_tail);
            __Pyx_INCREF(((PyObject *)__pyx_v_self->_elem_coder));
            __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_elem_coder));
            PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, ((PyObject *)__pyx_v_self->_elem_coder));
            __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_v_state_token = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "apache_beam/coders/coder_impl.py":1203
 *                                              (list, tuple)) else value_iter)
 *             state_token = self._write_state(tail, self._elem_coder)
 *             out.write_var_int64(-1)             # <<<<<<<<<<<<<<
 *             out.write(state_token, True)
 *             break
 */
          __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, -1L, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1203, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "apache_beam/coders/coder_impl.py":1204
 *             state_token = self._write_state(tail, self._elem_coder)
 *             out.write_var_int64(-1)
 *             out.write(state_token, True)             # <<<<<<<<<<<<<<
 *             break
 *       else:
 */
          if (!(likely(PyBytes_CheckExact(__pyx_v_state_token))||((__pyx_v_state_token) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_state_token)->tp_name), 0))) __PYX_ERR(0, 1204, __pyx_L1_error)
          __pyx_t_15.__pyx_n = 1;
          __pyx_t_15.nested = 1;
          __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_v_state_token), 0, &__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1204, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "apache_beam/coders/coder_impl.py":1205
 *             out.write_var_int64(-1)
 *             out.write(state_token, True)
 *             break             # <<<<<<<<<<<<<<
 *       else:
 *         if index > prev_index:
 */
          goto __pyx_L12_break;

          /* "apache_beam/coders/coder_impl.py":1196
 *           prev_index = index
 *           buffer = create_OutputStream()
 *           if (self._write_state is not None and             # <<<<<<<<<<<<<<
 *               out.size() - start_size > self._write_state_threshold):
 *             tail = (
 */
        }

        /* "apache_beam/coders/coder_impl.py":1191
 *         index += 1
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 *         if buffer.size() > target_buffer_size:             # <<<<<<<<<<<<<<
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())
 */
      }

      /* "apache_beam/coders/coder_impl.py":1188
 *       value_iter = value if isinstance(value, (list, tuple)) else iter(value)
 *       start_size = out.size()
 *       for elem in value_iter:             # <<<<<<<<<<<<<<
 *         index += 1
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 */
    }
    /*else*/ {

      /* "apache_beam/coders/coder_impl.py":1207
 *             break
 *       else:
 *         if index > prev_index:             # <<<<<<<<<<<<<<
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())
 */
      __pyx_t_9 = ((__pyx_v_index > __pyx_v_prev_index) != 0);
      if (__pyx_t_9) {

        /* "apache_beam/coders/coder_impl.py":1208
 *       else:
 *         if index > prev_index:
 *           out.write_var_int64(index - prev_index)             # <<<<<<<<<<<<<<
 *           out.write(buffer.get())
 *         out.write_var_int64(0)
 */
        __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, (__pyx_v_index - __pyx_v_prev_index), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "apache_beam/coders/coder_impl.py":1209
 *         if index > prev_index:
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())             # <<<<<<<<<<<<<<
 *         out.write_var_int64(0)
 * 
 */
        __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_buffer->__pyx_vtab)->get(__pyx_v_buffer, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1209, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_t_4), 0, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1209, __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/coders/coder_impl.py":1207
 *             break
 *       else:
 *         if index > prev_index:             # <<<<<<<<<<<<<<
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())
 */
      }

      /* "apache_beam/coders/coder_impl.py":1210
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())
 *         out.write_var_int64(0)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
      __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }

    /* "apache_beam/coders/coder_impl.py":1188
 *       value_iter = value if isinstance(value, (list, tuple)) else iter(value)
 *       start_size = out.size()
 *       for elem in value_iter:             # <<<<<<<<<<<<<<
 *         index += 1
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 */
    __pyx_L12_break:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":1164
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Sequence, create_OutputStream, bool) -> None
 *     # Compatible with Java's IterableLikeCoder.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_buffer);
  __Pyx_XDECREF(__pyx_v_elem);
  __Pyx_XDECREF(__pyx_v_value_iter);
  __Pyx_XDECREF(__pyx_v_start_size);
  __Pyx_XDECREF(__pyx_v_tail);
  __Pyx_XDECREF(__pyx_v_state_token);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1164, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1164, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1164, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1164, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1164, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1164, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_4encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1212
 *         out.write_var_int64(0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Sequence
 *     size = in_stream.read_bigendian_int32()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  int32_t __pyx_v_size;
  PyObject *__pyx_v_elements = NULL;
  int64_t __pyx_v_count;
  CYTHON_UNUSED int64_t __pyx_v__;
  PyObject *__pyx_v_state_token = NULL;
  CYTHON_UNUSED int32_t __pyx_8genexpr4__pyx_v__;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int32_t __pyx_t_8;
  int __pyx_t_9;
  int32_t __pyx_t_10;
  int32_t __pyx_t_11;
  int64_t __pyx_t_12;
  int64_t __pyx_t_13;
  int64_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1212, __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_in_stream), __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, 1212, __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_in_stream), __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, 1212, __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, 1212, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1212, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1214
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> Sequence
 *     size = in_stream.read_bigendian_int32()             # <<<<<<<<<<<<<<
 * 
 *     if size >= 0:
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_int32(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((int32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1214, __pyx_L1_error)
  __pyx_v_size = __pyx_t_8;

  /* "apache_beam/coders/coder_impl.py":1216
 *     size = in_stream.read_bigendian_int32()
 * 
 *     if size >= 0:             # <<<<<<<<<<<<<<
 *       elements = [
 *           self._elem_coder.decode_from_stream(in_stream, True)
 */
  __pyx_t_9 = ((__pyx_v_size >= 0) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1217
 * 
 *     if size >= 0:
 *       elements = [             # <<<<<<<<<<<<<<
 *           self._elem_coder.decode_from_stream(in_stream, True)
 *           for _ in range(size)
 */
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "apache_beam/coders/coder_impl.py":1219
 *       elements = [
 *           self._elem_coder.decode_from_stream(in_stream, True)
 *           for _ in range(size)             # <<<<<<<<<<<<<<
 *       ]  # type: Iterable[Any]
 *     else:
 */
      __pyx_t_8 = __pyx_v_size;
      __pyx_t_10 = __pyx_t_8;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
        __pyx_8genexpr4__pyx_v__ = __pyx_t_11;

        /* "apache_beam/coders/coder_impl.py":1218
 *     if size >= 0:
 *       elements = [
 *           self._elem_coder.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *           for _ in range(size)
 *       ]  # type: Iterable[Any]
 */
        __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_elem_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1217, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    } /* exit inner scope */
    __pyx_v_elements = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1216
 *     size = in_stream.read_bigendian_int32()
 * 
 *     if size >= 0:             # <<<<<<<<<<<<<<
 *       elements = [
 *           self._elem_coder.decode_from_stream(in_stream, True)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1222
 *       ]  # type: Iterable[Any]
 *     else:
 *       elements = []             # <<<<<<<<<<<<<<
 *       count = in_stream.read_var_int64()
 *       while count > 0:
 */
  /*else*/ {
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_elements = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1223
 *     else:
 *       elements = []
 *       count = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *       while count > 0:
 *         for _ in range(count):
 */
    __pyx_t_12 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_12 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1223, __pyx_L1_error)
    __pyx_v_count = __pyx_t_12;

    /* "apache_beam/coders/coder_impl.py":1224
 *       elements = []
 *       count = in_stream.read_var_int64()
 *       while count > 0:             # <<<<<<<<<<<<<<
 *         for _ in range(count):
 *           elements.append(self._elem_coder.decode_from_stream(in_stream, True))
 */
    while (1) {
      __pyx_t_9 = ((__pyx_v_count > 0) != 0);
      if (!__pyx_t_9) break;

      /* "apache_beam/coders/coder_impl.py":1225
 *       count = in_stream.read_var_int64()
 *       while count > 0:
 *         for _ in range(count):             # <<<<<<<<<<<<<<
 *           elements.append(self._elem_coder.decode_from_stream(in_stream, True))
 *         count = in_stream.read_var_int64()
 */
      __pyx_t_12 = __pyx_v_count;
      __pyx_t_13 = __pyx_t_12;
      for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
        __pyx_v__ = __pyx_t_14;

        /* "apache_beam/coders/coder_impl.py":1226
 *       while count > 0:
 *         for _ in range(count):
 *           elements.append(self._elem_coder.decode_from_stream(in_stream, True))             # <<<<<<<<<<<<<<
 *         count = in_stream.read_var_int64()
 * 
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_elem_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_15 = __Pyx_PyObject_Append(__pyx_v_elements, __pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1226, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }

      /* "apache_beam/coders/coder_impl.py":1227
 *         for _ in range(count):
 *           elements.append(self._elem_coder.decode_from_stream(in_stream, True))
 *         count = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 * 
 *       if count == -1:
 */
      __pyx_t_12 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_12 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1227, __pyx_L1_error)
      __pyx_v_count = __pyx_t_12;
    }

    /* "apache_beam/coders/coder_impl.py":1229
 *         count = in_stream.read_var_int64()
 * 
 *       if count == -1:             # <<<<<<<<<<<<<<
 *         if self._read_state is None:
 *           raise ValueError(
 */
    __pyx_t_9 = ((__pyx_v_count == -1L) != 0);
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":1230
 * 
 *       if count == -1:
 *         if self._read_state is None:             # <<<<<<<<<<<<<<
 *           raise ValueError(
 *               'Cannot read state-written iterable without state reader.')
 */
      __pyx_t_9 = (__pyx_v_self->_read_state == Py_None);
      __pyx_t_16 = (__pyx_t_9 != 0);
      if (unlikely(__pyx_t_16)) {

        /* "apache_beam/coders/coder_impl.py":1231
 *       if count == -1:
 *         if self._read_state is None:
 *           raise ValueError(             # <<<<<<<<<<<<<<
 *               'Cannot read state-written iterable without state reader.')
 * 
 */
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 1231, __pyx_L1_error)

        /* "apache_beam/coders/coder_impl.py":1230
 * 
 *       if count == -1:
 *         if self._read_state is None:             # <<<<<<<<<<<<<<
 *           raise ValueError(
 *               'Cannot read state-written iterable without state reader.')
 */
      }

      /* "apache_beam/coders/coder_impl.py":1234
 *               'Cannot read state-written iterable without state reader.')
 * 
 *         state_token = in_stream.read_all(True)             # <<<<<<<<<<<<<<
 *         elements = _ConcatSequence(
 *             elements, self._read_state(state_token, self._elem_coder))
 */
      __pyx_t_17.__pyx_n = 1;
      __pyx_t_17.nested = 1;
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_all(__pyx_v_in_stream, 0, &__pyx_t_17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_state_token = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1235
 * 
 *         state_token = in_stream.read_all(True)
 *         elements = _ConcatSequence(             # <<<<<<<<<<<<<<
 *             elements, self._read_state(state_token, self._elem_coder))
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ConcatSequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "apache_beam/coders/coder_impl.py":1236
 *         state_token = in_stream.read_all(True)
 *         elements = _ConcatSequence(
 *             elements, self._read_state(state_token, self._elem_coder))             # <<<<<<<<<<<<<<
 * 
 *     return self._construct_from_sequence(elements)
 */
      __Pyx_INCREF(__pyx_v_self->_read_state);
      __pyx_t_7 = __pyx_v_self->_read_state; __pyx_t_3 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_state_token, ((PyObject *)__pyx_v_self->_elem_coder)};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_state_token, ((PyObject *)__pyx_v_self->_elem_coder)};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __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_state_token);
        __Pyx_GIVEREF(__pyx_v_state_token);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_state_token);
        __Pyx_INCREF(((PyObject *)__pyx_v_self->_elem_coder));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_elem_coder));
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, ((PyObject *)__pyx_v_self->_elem_coder));
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __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[3] = {__pyx_t_7, __pyx_v_elements, __pyx_t_4};
        __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, 1235, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __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[3] = {__pyx_t_7, __pyx_v_elements, __pyx_t_4};
        __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, 1235, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __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_elements);
        __Pyx_GIVEREF(__pyx_v_elements);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_elements);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __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_SET(__pyx_v_elements, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1229
 *         count = in_stream.read_var_int64()
 * 
 *       if count == -1:             # <<<<<<<<<<<<<<
 *         if self._read_state is None:
 *           raise ValueError(
 */
    }
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":1238
 *             elements, self._read_state(state_token, self._elem_coder))
 * 
 *     return self._construct_from_sequence(elements)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_construct_from_sequence(__pyx_v_self, __pyx_v_elements, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1212
 *         out.write_var_int64(0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Sequence
 *     size = in_stream.read_bigendian_int32()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_elements);
  __Pyx_XDECREF(__pyx_v_state_token);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1212, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1212, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1212, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1212, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1212, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_6decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1240
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_estimated_size = NULL;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1240, __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, __pyx_v_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, 1240, __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, __pyx_v_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, 1240, __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, 1240, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 1240, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1245
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores element sizes.
 *     estimated_size, _ = (self.get_estimated_size_and_observables(value))             # <<<<<<<<<<<<<<
 *     return estimated_size
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1245, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1245, __pyx_L1_error)
    __pyx_t_8 = NULL;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1245, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_estimated_size = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v__ = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "apache_beam/coders/coder_impl.py":1246
 *     # TODO(ccy): This ignores element sizes.
 *     estimated_size, _ = (self.get_estimated_size_and_observables(value))
 *     return estimated_size             # <<<<<<<<<<<<<<
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_estimated_size);
  __pyx_r = __pyx_v_estimated_size;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1240
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_estimated_size);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size[] = "Estimates the encoded size of the given value, in bytes.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 1240, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1240, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1240, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_8estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1248
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_estimated_size = NULL;
  PyObject *__pyx_v_observables = NULL;
  PyObject *__pyx_v_elem = NULL;
  PyObject *__pyx_v_child_size = NULL;
  PyObject *__pyx_v_child_observables = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1248, __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, __pyx_v_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, 1248, __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, __pyx_v_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, 1248, __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, 1248, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 1248, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1252
 * 
 *     """Returns estimated size of value along with any nested observables."""
 *     estimated_size = 0             # <<<<<<<<<<<<<<
 *     # Size of 32-bit integer storing number of elements.
 *     estimated_size += 4
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_estimated_size = __pyx_int_0;

  /* "apache_beam/coders/coder_impl.py":1254
 *     estimated_size = 0
 *     # Size of 32-bit integer storing number of elements.
 *     estimated_size += 4             # <<<<<<<<<<<<<<
 *     if isinstance(value, observable.ObservableMixin):
 *       return estimated_size, [(value, self._elem_coder)]
 */
  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_estimated_size, __pyx_int_4, 4, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1255
 *     # Size of 32-bit integer storing number of elements.
 *     estimated_size += 4
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       return estimated_size, [(value, self._elem_coder)]
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1256
 *     estimated_size += 4
 *     if isinstance(value, observable.ObservableMixin):
 *       return estimated_size, [(value, self._elem_coder)]             # <<<<<<<<<<<<<<
 * 
 *     observables = []  # type: Observables
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->_elem_coder));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_elem_coder));
    PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_elem_coder));
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_estimated_size);
    __Pyx_GIVEREF(__pyx_v_estimated_size);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_estimated_size);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":1255
 *     # Size of 32-bit integer storing number of elements.
 *     estimated_size += 4
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       return estimated_size, [(value, self._elem_coder)]
 * 
 */
  }

  /* "apache_beam/coders/coder_impl.py":1258
 *       return estimated_size, [(value, self._elem_coder)]
 * 
 *     observables = []  # type: Observables             # <<<<<<<<<<<<<<
 *     for elem in value:
 *       child_size, child_observables = (
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_observables = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1259
 * 
 *     observables = []  # type: Observables
 *     for elem in value:             # <<<<<<<<<<<<<<
 *       child_size, child_observables = (
 *           self._elem_coder.get_estimated_size_and_observables(
 */
  if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
    __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1259, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1259, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1259, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_11(__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, 1259, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1261
 *     for elem in value:
 *       child_size, child_observables = (
 *           self._elem_coder.get_estimated_size_and_observables(             # <<<<<<<<<<<<<<
 *               elem, nested=True))
 *       estimated_size += child_size
 */
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.nested = 1;
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_elem_coder->__pyx_vtab)->get_estimated_size_and_observables(__pyx_v_self->_elem_coder, __pyx_v_elem, 0, &__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 1260, __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_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = Py_TYPE(__pyx_t_3)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_7 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1260, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1260, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }

    /* "apache_beam/coders/coder_impl.py":1260
 *     observables = []  # type: Observables
 *     for elem in value:
 *       child_size, child_observables = (             # <<<<<<<<<<<<<<
 *           self._elem_coder.get_estimated_size_and_observables(
 *               elem, nested=True))
 */
    __Pyx_XDECREF_SET(__pyx_v_child_size, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_child_observables, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":1263
 *           self._elem_coder.get_estimated_size_and_observables(
 *               elem, nested=True))
 *       estimated_size += child_size             # <<<<<<<<<<<<<<
 *       observables += child_observables
 *     # TODO: (https://github.com/apache/beam/issues/18169) Update to use an
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_v_child_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1264
 *               elem, nested=True))
 *       estimated_size += child_size
 *       observables += child_observables             # <<<<<<<<<<<<<<
 *     # TODO: (https://github.com/apache/beam/issues/18169) Update to use an
 *     # accurate count depending on size and count, currently we are
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_observables, __pyx_v_child_observables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_observables, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1259
 * 
 *     observables = []  # type: Observables
 *     for elem in value:             # <<<<<<<<<<<<<<
 *       child_size, child_observables = (
 *           self._elem_coder.get_estimated_size_and_observables(
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1273
 *     # TODO: More efficient size estimation in the case of state-backed
 *     # iterables.
 *     return estimated_size, observables             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_estimated_size);
  __Pyx_GIVEREF(__pyx_v_estimated_size);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_estimated_size);
  __Pyx_INCREF(__pyx_v_observables);
  __Pyx_GIVEREF(__pyx_v_observables);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_observables);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1248
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_estimated_size);
  __Pyx_XDECREF(__pyx_v_observables);
  __Pyx_XDECREF(__pyx_v_elem);
  __Pyx_XDECREF(__pyx_v_child_size);
  __Pyx_XDECREF(__pyx_v_child_observables);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables[] = "Returns estimated size of value along with any nested observables.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_estimated_size_and_observables") < 0)) __PYX_ERR(0, 1248, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1248, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1248, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_10get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_12__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_write_state_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_elem_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_elem_coder));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->_elem_coder));
  __Pyx_INCREF(__pyx_v_self->_read_state);
  __Pyx_GIVEREF(__pyx_v_self->_read_state);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->_read_state);
  __Pyx_INCREF(__pyx_v_self->_write_state);
  __Pyx_GIVEREF(__pyx_v_self->_write_state);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->_write_state);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->_elem_coder) != 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->_read_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->_write_state != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_SequenceCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_190324669);
    __Pyx_GIVEREF(__pyx_int_190324669);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_190324669);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, None), state
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_SequenceCoderImpl); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_190324669);
    __Pyx_GIVEREF(__pyx_int_190324669);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_190324669);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_14__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.SequenceCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1280
 * 
 *   A coder for homogeneous tuple objects."""
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_sequence", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_components) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_components);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1280, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1281
 *   A coder for homogeneous tuple objects."""
 *   def _construct_from_sequence(self, components):
 *     return tuple(components)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1280
 * 
 *   A coder for homogeneous tuple objects."""
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence = {"_construct_from_sequence", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_construct_from_sequence (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_components));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_sequence", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_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_6coders_10coder_impl_22TupleSequenceCoderImpl_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base._write_state_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  __Pyx_INCREF(__pyx_v_self->__pyx_base._read_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._read_state);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base._read_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._write_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._write_state);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base._write_state);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base._elem_coder) != 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._read_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._write_state != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_TupleSequenceCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_190324669);
    __Pyx_GIVEREF(__pyx_int_190324669);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_190324669);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, None), state
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_TupleSequenceCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_190324669);
    __Pyx_GIVEREF(__pyx_int_190324669);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_190324669);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_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_6coders_10coder_impl_22TupleSequenceCoderImpl_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TupleSequenceCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1286
 * class _AbstractIterable(object):
 *   """Wraps an iterable hiding methods that might not always be available."""
 *   def __init__(self, contents):             # <<<<<<<<<<<<<<
 *     self._contents = contents
 * 
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_contents = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_contents,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_contents)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1286, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_contents = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1286, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self), __pyx_v_contents);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self, PyObject *__pyx_v_contents) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1287
 *   """Wraps an iterable hiding methods that might not always be available."""
 *   def __init__(self, contents):
 *     self._contents = contents             # <<<<<<<<<<<<<<
 * 
 *   def __iter__(self):
 */
  __Pyx_INCREF(__pyx_v_contents);
  __Pyx_GIVEREF(__pyx_v_contents);
  __Pyx_GOTREF(__pyx_v_self->_contents);
  __Pyx_DECREF(__pyx_v_self->_contents);
  __pyx_v_self->_contents = __pyx_v_contents;

  /* "apache_beam/coders/coder_impl.py":1286
 * class _AbstractIterable(object):
 *   """Wraps an iterable hiding methods that might not always be available."""
 *   def __init__(self, contents):             # <<<<<<<<<<<<<<
 *     self._contents = contents
 * 
 */

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

/* "apache_beam/coders/coder_impl.py":1289
 *     self._contents = contents
 * 
 *   def __iter__(self):             # <<<<<<<<<<<<<<
 *     return iter(self._contents)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_2__iter__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_2__iter__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "apache_beam/coders/coder_impl.py":1290
 * 
 *   def __iter__(self):
 *     return iter(self._contents)             # <<<<<<<<<<<<<<
 * 
 *   def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->_contents;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1289
 *     self._contents = contents
 * 
 *   def __iter__(self):             # <<<<<<<<<<<<<<
 *     return iter(self._contents)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1292
 *     return iter(self._contents)
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     head = [repr(e) for e in itertools.islice(self, 4)]
 *     if len(head) == 4:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_4__repr__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_4__repr__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self) {
  PyObject *__pyx_v_head = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "apache_beam/coders/coder_impl.py":1293
 * 
 *   def __repr__(self):
 *     head = [repr(e) for e in itertools.islice(self, 4)]             # <<<<<<<<<<<<<<
 *     if len(head) == 4:
 *       head[-1] = '...'
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_itertools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_islice); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 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_5 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_int_4};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L5_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_int_4};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L5_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 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, 1293, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_self));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_self));
      __Pyx_INCREF(__pyx_int_4);
      __Pyx_GIVEREF(__pyx_int_4);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_int_4);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1293, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1293, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1293, __pyx_L5_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_8(__pyx_t_4);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1293, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Repr(__pyx_8genexpr5__pyx_v_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1293, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_e); __pyx_8genexpr5__pyx_v_e = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_e); __pyx_8genexpr5__pyx_v_e = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_v_head = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1294
 *   def __repr__(self):
 *     head = [repr(e) for e in itertools.islice(self, 4)]
 *     if len(head) == 4:             # <<<<<<<<<<<<<<
 *       head[-1] = '...'
 *     return '_AbstractIterable([%s])' % ', '.join(head)
 */
  __pyx_t_7 = PyList_GET_SIZE(__pyx_v_head); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1294, __pyx_L1_error)
  __pyx_t_9 = ((__pyx_t_7 == 4) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1295
 *     head = [repr(e) for e in itertools.islice(self, 4)]
 *     if len(head) == 4:
 *       head[-1] = '...'             # <<<<<<<<<<<<<<
 *     return '_AbstractIterable([%s])' % ', '.join(head)
 * 
 */
    if (unlikely(__Pyx_SetItemInt(__pyx_v_head, -1L, __pyx_kp_u__12, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1295, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":1294
 *   def __repr__(self):
 *     head = [repr(e) for e in itertools.islice(self, 4)]
 *     if len(head) == 4:             # <<<<<<<<<<<<<<
 *       head[-1] = '...'
 *     return '_AbstractIterable([%s])' % ', '.join(head)
 */
  }

  /* "apache_beam/coders/coder_impl.py":1296
 *     if len(head) == 4:
 *       head[-1] = '...'
 *     return '_AbstractIterable([%s])' % ', '.join(head)             # <<<<<<<<<<<<<<
 * 
 *   # Mostly useful for tests.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__13, __pyx_v_head); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_AbstractIterable_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1292
 *     return iter(self._contents)
 * 
 *   def __repr__(self):             # <<<<<<<<<<<<<<
 *     head = [repr(e) for e in itertools.islice(self, 4)]
 *     if len(head) == 4:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_head);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1299
 * 
 *   # Mostly useful for tests.
 *   def __eq__(left, right):             # <<<<<<<<<<<<<<
 *     end = object()
 *     for a, b in itertools.zip_longest(left, right, fillvalue=end):
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_7__eq__(PyObject *__pyx_v_left, PyObject *__pyx_v_right); /*proto*/
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_7__eq__(PyObject *__pyx_v_left, PyObject *__pyx_v_right) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_6__eq__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_left), ((PyObject *)__pyx_v_right));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_6__eq__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_left, PyObject *__pyx_v_right) {
  PyObject *__pyx_v_end = NULL;
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "apache_beam/coders/coder_impl.py":1300
 *   # Mostly useful for tests.
 *   def __eq__(left, right):
 *     end = object()             # <<<<<<<<<<<<<<
 *     for a, b in itertools.zip_longest(left, right, fillvalue=end):
 *       if a != b:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_end = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1301
 *   def __eq__(left, right):
 *     end = object()
 *     for a, b in itertools.zip_longest(left, right, fillvalue=end):             # <<<<<<<<<<<<<<
 *       if a != b:
 *         return False
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_itertools); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zip_longest); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_left));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_left));
  __Pyx_INCREF(__pyx_v_right);
  __Pyx_GIVEREF(__pyx_v_right);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_right);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fillvalue, __pyx_v_end) < 0) __PYX_ERR(0, 1301, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1301, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1301, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1301, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1301, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1301, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1301, __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, 1301, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1301, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 1301, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":1302
 *     end = object()
 *     for a, b in itertools.zip_longest(left, right, fillvalue=end):
 *       if a != b:             # <<<<<<<<<<<<<<
 *         return False
 *     return True
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1302, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1302, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":1303
 *     for a, b in itertools.zip_longest(left, right, fillvalue=end):
 *       if a != b:
 *         return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "apache_beam/coders/coder_impl.py":1302
 *     end = object()
 *     for a, b in itertools.zip_longest(left, right, fillvalue=end):
 *       if a != b:             # <<<<<<<<<<<<<<
 *         return False
 *     return True
 */
    }

    /* "apache_beam/coders/coder_impl.py":1301
 *   def __eq__(left, right):
 *     end = object()
 *     for a, b in itertools.zip_longest(left, right, fillvalue=end):             # <<<<<<<<<<<<<<
 *       if a != b:
 *         return False
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":1304
 *       if a != b:
 *         return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1299
 * 
 *   # Mostly useful for tests.
 *   def __eq__(left, right):             # <<<<<<<<<<<<<<
 *     end = object()
 *     for a, b in itertools.zip_longest(left, right, fillvalue=end):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_end);
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_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_6coders_10coder_impl_17_AbstractIterable_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._contents,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->_contents);
  __Pyx_GIVEREF(__pyx_v_self->_contents);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_contents);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._contents,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._contents,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._contents is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._contents,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._contents is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->_contents != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._contents is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._contents is not None
 *     if use_setstate:
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__AbstractIterable); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_213871712);
    __Pyx_GIVEREF(__pyx_int_213871712);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_213871712);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._contents is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, None), state
 *     else:
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle__AbstractIterable); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_213871712);
    __Pyx_GIVEREF(__pyx_int_213871712);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_213871712);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_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_6coders_10coder_impl_17_AbstractIterable_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17_AbstractIterable_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl._AbstractIterable.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1318
 * 
 *   A coder for homogeneous iterable objects."""
 *   def __init__(self, *args, use_abstract_iterable=None, **kwargs):             # <<<<<<<<<<<<<<
 *     super().__init__(*args, **kwargs)
 *     if use_abstract_iterable is None:
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_use_abstract_iterable = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 0) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 0, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return -1;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_use_abstract_iterable,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      if (kw_args == 1) {
        const Py_ssize_t index = 0;
        PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
        if (value) { values[index] = value; kw_args--; }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, 0, "__init__") < 0)) __PYX_ERR(0, 1318, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
      goto __pyx_L5_argtuple_error;
    } else {
    }
    __pyx_v_use_abstract_iterable = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1318, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v_self), __pyx_v_use_abstract_iterable, __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_use_abstract_iterable, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_use_abstract_iterable);

  /* "apache_beam/coders/coder_impl.py":1319
 *   A coder for homogeneous iterable objects."""
 *   def __init__(self, *args, use_abstract_iterable=None, **kwargs):
 *     super().__init__(*args, **kwargs)             # <<<<<<<<<<<<<<
 *     if use_abstract_iterable is None:
 *       use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":1320
 *   def __init__(self, *args, use_abstract_iterable=None, **kwargs):
 *     super().__init__(*args, **kwargs)
 *     if use_abstract_iterable is None:             # <<<<<<<<<<<<<<
 *       use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default
 *     self._use_abstract_iterable = use_abstract_iterable
 */
  __pyx_t_4 = (__pyx_v_use_abstract_iterable == Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "apache_beam/coders/coder_impl.py":1321
 *     super().__init__(*args, **kwargs)
 *     if use_abstract_iterable is None:
 *       use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default             # <<<<<<<<<<<<<<
 *     self._use_abstract_iterable = use_abstract_iterable
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_iterable_coder_uses_abstract_it); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_use_abstract_iterable, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":1320
 *   def __init__(self, *args, use_abstract_iterable=None, **kwargs):
 *     super().__init__(*args, **kwargs)
 *     if use_abstract_iterable is None:             # <<<<<<<<<<<<<<
 *       use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default
 *     self._use_abstract_iterable = use_abstract_iterable
 */
  }

  /* "apache_beam/coders/coder_impl.py":1322
 *     if use_abstract_iterable is None:
 *       use_abstract_iterable = _iterable_coder_uses_abstract_iterable_by_default
 *     self._use_abstract_iterable = use_abstract_iterable             # <<<<<<<<<<<<<<
 * 
 *   def _construct_from_sequence(self, components):
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_use_abstract_iterable); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error)
  __pyx_v_self->_use_abstract_iterable = __pyx_t_5;

  /* "apache_beam/coders/coder_impl.py":1318
 * 
 *   A coder for homogeneous iterable objects."""
 *   def __init__(self, *args, use_abstract_iterable=None, **kwargs):             # <<<<<<<<<<<<<<
 *     super().__init__(*args, **kwargs)
 *     if use_abstract_iterable is None:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_use_abstract_iterable);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1324
 *     self._use_abstract_iterable = use_abstract_iterable
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     if self._use_abstract_iterable:
 *       return _AbstractIterable(components)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17IterableCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_sequence", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_components) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_components);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1325
 * 
 *   def _construct_from_sequence(self, components):
 *     if self._use_abstract_iterable:             # <<<<<<<<<<<<<<
 *       return _AbstractIterable(components)
 *     else:
 */
  __pyx_t_5 = (__pyx_v_self->_use_abstract_iterable != 0);
  if (__pyx_t_5) {

    /* "apache_beam/coders/coder_impl.py":1326
 *   def _construct_from_sequence(self, components):
 *     if self._use_abstract_iterable:
 *       return _AbstractIterable(components)             # <<<<<<<<<<<<<<
 *     else:
 *       return components
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable), __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":1325
 * 
 *   def _construct_from_sequence(self, components):
 *     if self._use_abstract_iterable:             # <<<<<<<<<<<<<<
 *       return _AbstractIterable(components)
 *     else:
 */
  }

  /* "apache_beam/coders/coder_impl.py":1328
 *       return _AbstractIterable(components)
 *     else:
 *       return components             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_components);
    __pyx_r = __pyx_v_components;
    goto __pyx_L0;
  }

  /* "apache_beam/coders/coder_impl.py":1324
 *     self._use_abstract_iterable = use_abstract_iterable
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     if self._use_abstract_iterable:
 *       return _AbstractIterable(components)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence = {"_construct_from_sequence", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_construct_from_sequence (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_2_construct_from_sequence(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_components));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_2_construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_sequence", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17IterableCoderImpl__construct_from_sequence(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._elem_coder, self._read_state, self._use_abstract_iterable, self._write_state, self._write_state_threshold)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_use_abstract_iterable); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base._write_state_threshold); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  __Pyx_INCREF(__pyx_v_self->__pyx_base._read_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._read_state);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base._read_state);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._write_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._write_state);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->__pyx_base._write_state);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._elem_coder, self._read_state, self._use_abstract_iterable, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._elem_coder, self._read_state, self._use_abstract_iterable, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._elem_coder, self._read_state, self._use_abstract_iterable, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->__pyx_base._elem_coder) != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (__pyx_v_self->__pyx_base._read_state != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_5 = __pyx_t_4;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = (__pyx_v_self->__pyx_base._write_state != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    __pyx_t_5 = __pyx_t_6;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_IterableCoderImpl); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_63293558);
    __Pyx_GIVEREF(__pyx_int_63293558);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_63293558);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, None), state
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_IterableCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_63293558);
    __Pyx_GIVEREF(__pyx_int_63293558);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_63293558);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IterableCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1335
 * 
 *   A coder for homogeneous list objects."""
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return components if isinstance(components, list) else list(components)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v_components, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_sequence", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_components) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_components);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1336
 *   A coder for homogeneous list objects."""
 *   def _construct_from_sequence(self, components):
 *     return components if isinstance(components, list) else list(components)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyList_Check(__pyx_v_components); 
  if ((__pyx_t_5 != 0)) {
    __Pyx_INCREF(__pyx_v_components);
    __pyx_t_1 = __pyx_v_components;
  } else {
    __pyx_t_2 = PySequence_List(__pyx_v_components); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1336, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1335
 * 
 *   A coder for homogeneous list objects."""
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return components if isinstance(components, list) else list(components)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence = {"_construct_from_sequence", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_construct_from_sequence (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_components));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v_components) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_construct_from_sequence", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence(__pyx_v_self, __pyx_v_components, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl._construct_from_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_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_6coders_10coder_impl_13ListCoderImpl_2__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->__pyx_base._write_state_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  __Pyx_INCREF(__pyx_v_self->__pyx_base._read_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._read_state);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->__pyx_base._read_state);
  __Pyx_INCREF(__pyx_v_self->__pyx_base._write_state);
  __Pyx_GIVEREF(__pyx_v_self->__pyx_base._write_state);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base._write_state);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._elem_coder, self._read_state, self._write_state, self._write_state_threshold)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base._elem_coder) != 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._read_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._write_state != Py_None);
    __pyx_t_5 = (__pyx_t_3 != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ListCoderImpl); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_190324669);
    __Pyx_GIVEREF(__pyx_int_190324669);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_190324669);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._elem_coder is not None or self._read_state is not None or self._write_state is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, None), state
 *     else:
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ListCoderImpl); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_190324669);
    __Pyx_GIVEREF(__pyx_int_190324669);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_190324669);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_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_6coders_10coder_impl_13ListCoderImpl_4__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_13ListCoderImpl_4__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ListCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1363
 * 
 *   Coder for a PaneInfo descriptor."""
 *   def _choose_encoding(self, value):             # <<<<<<<<<<<<<<
 *     if ((value._index == 0 and value._nonspeculative_index == 0) or
 *         value._timing == PaneInfoTiming_UNKNOWN):
 */

static int __pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl__choose_encoding(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_choose_encoding", 0);

  /* "apache_beam/coders/coder_impl.py":1364
 *   Coder for a PaneInfo descriptor."""
 *   def _choose_encoding(self, value):
 *     if ((value._index == 0 and value._nonspeculative_index == 0) or             # <<<<<<<<<<<<<<
 *         value._timing == PaneInfoTiming_UNKNOWN):
 *       return PaneInfoEncoding_FIRST
 */
  __pyx_t_2 = ((__pyx_v_value->_index == 0) != 0);
  if (!__pyx_t_2) {
    goto __pyx_L5_next_or;
  } else {
  }
  __pyx_t_2 = ((__pyx_v_value->_nonspeculative_index == 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_L5_next_or:;

  /* "apache_beam/coders/coder_impl.py":1365
 *   def _choose_encoding(self, value):
 *     if ((value._index == 0 and value._nonspeculative_index == 0) or
 *         value._timing == PaneInfoTiming_UNKNOWN):             # <<<<<<<<<<<<<<
 *       return PaneInfoEncoding_FIRST
 *     elif (value._index == value._nonspeculative_index or
 */
  __pyx_t_2 = ((__pyx_v_value->_timing == __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;

  /* "apache_beam/coders/coder_impl.py":1364
 *   Coder for a PaneInfo descriptor."""
 *   def _choose_encoding(self, value):
 *     if ((value._index == 0 and value._nonspeculative_index == 0) or             # <<<<<<<<<<<<<<
 *         value._timing == PaneInfoTiming_UNKNOWN):
 *       return PaneInfoEncoding_FIRST
 */
  if (__pyx_t_1) {

    /* "apache_beam/coders/coder_impl.py":1366
 *     if ((value._index == 0 and value._nonspeculative_index == 0) or
 *         value._timing == PaneInfoTiming_UNKNOWN):
 *       return PaneInfoEncoding_FIRST             # <<<<<<<<<<<<<<
 *     elif (value._index == value._nonspeculative_index or
 *           value._timing == windowed_value.PaneInfoTiming.EARLY):
 */
    __pyx_r = __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":1364
 *   Coder for a PaneInfo descriptor."""
 *   def _choose_encoding(self, value):
 *     if ((value._index == 0 and value._nonspeculative_index == 0) or             # <<<<<<<<<<<<<<
 *         value._timing == PaneInfoTiming_UNKNOWN):
 *       return PaneInfoEncoding_FIRST
 */
  }

  /* "apache_beam/coders/coder_impl.py":1367
 *         value._timing == PaneInfoTiming_UNKNOWN):
 *       return PaneInfoEncoding_FIRST
 *     elif (value._index == value._nonspeculative_index or             # <<<<<<<<<<<<<<
 *           value._timing == windowed_value.PaneInfoTiming.EARLY):
 *       return PaneInfoEncoding.ONE_INDEX
 */
  __pyx_t_2 = ((__pyx_v_value->_index == __pyx_v_value->_nonspeculative_index) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }

  /* "apache_beam/coders/coder_impl.py":1368
 *       return PaneInfoEncoding_FIRST
 *     elif (value._index == value._nonspeculative_index or
 *           value._timing == windowed_value.PaneInfoTiming.EARLY):             # <<<<<<<<<<<<<<
 *       return PaneInfoEncoding.ONE_INDEX
 *     else:
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_value->_timing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_windowed_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PaneInfoTiming); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1368, __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_EARLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;

  /* "apache_beam/coders/coder_impl.py":1367
 *         value._timing == PaneInfoTiming_UNKNOWN):
 *       return PaneInfoEncoding_FIRST
 *     elif (value._index == value._nonspeculative_index or             # <<<<<<<<<<<<<<
 *           value._timing == windowed_value.PaneInfoTiming.EARLY):
 *       return PaneInfoEncoding.ONE_INDEX
 */
  if (__pyx_t_1) {

    /* "apache_beam/coders/coder_impl.py":1369
 *     elif (value._index == value._nonspeculative_index or
 *           value._timing == windowed_value.PaneInfoTiming.EARLY):
 *       return PaneInfoEncoding.ONE_INDEX             # <<<<<<<<<<<<<<
 *     else:
 *       return PaneInfoEncoding.TWO_INDICES
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ONE_INDEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":1367
 *         value._timing == PaneInfoTiming_UNKNOWN):
 *       return PaneInfoEncoding_FIRST
 *     elif (value._index == value._nonspeculative_index or             # <<<<<<<<<<<<<<
 *           value._timing == windowed_value.PaneInfoTiming.EARLY):
 *       return PaneInfoEncoding.ONE_INDEX
 */
  }

  /* "apache_beam/coders/coder_impl.py":1371
 *       return PaneInfoEncoding.ONE_INDEX
 *     else:
 *       return PaneInfoEncoding.TWO_INDICES             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TWO_INDICES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1371, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;
  }

  /* "apache_beam/coders/coder_impl.py":1363
 * 
 *   Coder for a PaneInfo descriptor."""
 *   def _choose_encoding(self, value):             # <<<<<<<<<<<<<<
 *     if ((value._index == 0 and value._nonspeculative_index == 0) or
 *         value._timing == PaneInfoTiming_UNKNOWN):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("apache_beam.coders.coder_impl.PaneInfoCoderImpl._choose_encoding", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1373
 *       return PaneInfoEncoding.TWO_INDICES
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None
 *     pane_info = value  # cast
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *__pyx_v_pane_info = 0;
  int __pyx_v_encoding_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int64_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1373, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1373, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1373, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1373, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1373, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1375
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None
 *     pane_info = value  # cast             # <<<<<<<<<<<<<<
 *     encoding_type = self._choose_encoding(pane_info)
 *     out.write_byte(pane_info._encoded_byte | (encoding_type << 4))
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo))))) __PYX_ERR(0, 1375, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1376
 *     # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None
 *     pane_info = value  # cast
 *     encoding_type = self._choose_encoding(pane_info)             # <<<<<<<<<<<<<<
 *     out.write_byte(pane_info._encoded_byte | (encoding_type << 4))
 *     if encoding_type == PaneInfoEncoding_FIRST:
 */
  __pyx_v_encoding_type = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_choose_encoding(__pyx_v_self, __pyx_v_pane_info);

  /* "apache_beam/coders/coder_impl.py":1377
 *     pane_info = value  # cast
 *     encoding_type = self._choose_encoding(pane_info)
 *     out.write_byte(pane_info._encoded_byte | (encoding_type << 4))             # <<<<<<<<<<<<<<
 *     if encoding_type == PaneInfoEncoding_FIRST:
 *       return
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, (__pyx_v_pane_info->_encoded_byte | (__pyx_v_encoding_type << 4)), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1378
 *     encoding_type = self._choose_encoding(pane_info)
 *     out.write_byte(pane_info._encoded_byte | (encoding_type << 4))
 *     if encoding_type == PaneInfoEncoding_FIRST:             # <<<<<<<<<<<<<<
 *       return
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 */
  __pyx_t_8 = ((__pyx_v_encoding_type == __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST) != 0);
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":1379
 *     out.write_byte(pane_info._encoded_byte | (encoding_type << 4))
 *     if encoding_type == PaneInfoEncoding_FIRST:
 *       return             # <<<<<<<<<<<<<<
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       out.write_var_int64(value.index)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":1378
 *     encoding_type = self._choose_encoding(pane_info)
 *     out.write_byte(pane_info._encoded_byte | (encoding_type << 4))
 *     if encoding_type == PaneInfoEncoding_FIRST:             # <<<<<<<<<<<<<<
 *       return
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 */
  }

  /* "apache_beam/coders/coder_impl.py":1380
 *     if encoding_type == PaneInfoEncoding_FIRST:
 *       return
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:             # <<<<<<<<<<<<<<
 *       out.write_var_int64(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ONE_INDEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":1381
 *       return
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       out.write_var_int64(value.index)             # <<<<<<<<<<<<<<
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 *       out.write_var_int64(value.index)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_9, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":1380
 *     if encoding_type == PaneInfoEncoding_FIRST:
 *       return
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:             # <<<<<<<<<<<<<<
 *       out.write_var_int64(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1382
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       out.write_var_int64(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:             # <<<<<<<<<<<<<<
 *       out.write_var_int64(value.index)
 *       out.write_var_int64(value.nonspeculative_index)
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TWO_INDICES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(__pyx_t_8)) {

    /* "apache_beam/coders/coder_impl.py":1383
 *       out.write_var_int64(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 *       out.write_var_int64(value.index)             # <<<<<<<<<<<<<<
 *       out.write_var_int64(value.nonspeculative_index)
 *     else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_9, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":1384
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 *       out.write_var_int64(value.index)
 *       out.write_var_int64(value.nonspeculative_index)             # <<<<<<<<<<<<<<
 *     else:
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_nonspeculative_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1384, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_9, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":1382
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       out.write_var_int64(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:             # <<<<<<<<<<<<<<
 *       out.write_var_int64(value.index)
 *       out.write_var_int64(value.nonspeculative_index)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1386
 *       out.write_var_int64(value.nonspeculative_index)
 *     else:
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_Invalid_PaneInfoEncoding_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1386, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":1373
 *       return PaneInfoEncoding.TWO_INDICES
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None
 *     pane_info = value  # cast
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pane_info);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1373, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1373, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1373, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1373, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1373, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1388
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> windowed_value.PaneInfo
 *     encoded_first_byte = in_stream.read_byte()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  int __pyx_v_encoded_first_byte;
  int __pyx_v_encoding_type;
  PyObject *__pyx_v_base = NULL;
  int64_t __pyx_v_index;
  int64_t __pyx_v_nonspeculative_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  long __pyx_t_8;
  int __pyx_t_9;
  int64_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1388, __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_in_stream), __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, 1388, __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_in_stream), __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, 1388, __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, 1388, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1388, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1390
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> windowed_value.PaneInfo
 *     encoded_first_byte = in_stream.read_byte()             # <<<<<<<<<<<<<<
 *     base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF]
 *     assert base is not None
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_byte(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((long)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1390, __pyx_L1_error)
  __pyx_v_encoded_first_byte = __pyx_t_8;

  /* "apache_beam/coders/coder_impl.py":1391
 *     # type: (create_InputStream, bool) -> windowed_value.PaneInfo
 *     encoded_first_byte = in_stream.read_byte()
 *     base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF]             # <<<<<<<<<<<<<<
 *     assert base is not None
 *     encoding_type = encoded_first_byte >> 4
 */
  if (unlikely(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1391, __pyx_L1_error)
  }
  __pyx_t_8 = (__pyx_v_encoded_first_byte & 0xF);
  __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, __pyx_t_8, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_base = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1392
 *     encoded_first_byte = in_stream.read_byte()
 *     base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF]
 *     assert base is not None             # <<<<<<<<<<<<<<
 *     encoding_type = encoded_first_byte >> 4
 *     if encoding_type == PaneInfoEncoding_FIRST:
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_9 = (__pyx_v_base != Py_None);
    if (unlikely(!(__pyx_t_9 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 1392, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/coders/coder_impl.py":1393
 *     base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF]
 *     assert base is not None
 *     encoding_type = encoded_first_byte >> 4             # <<<<<<<<<<<<<<
 *     if encoding_type == PaneInfoEncoding_FIRST:
 *       return base
 */
  __pyx_v_encoding_type = (__pyx_v_encoded_first_byte >> 4);

  /* "apache_beam/coders/coder_impl.py":1394
 *     assert base is not None
 *     encoding_type = encoded_first_byte >> 4
 *     if encoding_type == PaneInfoEncoding_FIRST:             # <<<<<<<<<<<<<<
 *       return base
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 */
  __pyx_t_9 = ((__pyx_v_encoding_type == __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1395
 *     encoding_type = encoded_first_byte >> 4
 *     if encoding_type == PaneInfoEncoding_FIRST:
 *       return base             # <<<<<<<<<<<<<<
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       index = in_stream.read_var_int64()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_base);
    __pyx_r = __pyx_v_base;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":1394
 *     assert base is not None
 *     encoding_type = encoded_first_byte >> 4
 *     if encoding_type == PaneInfoEncoding_FIRST:             # <<<<<<<<<<<<<<
 *       return base
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 */
  }

  /* "apache_beam/coders/coder_impl.py":1396
 *     if encoding_type == PaneInfoEncoding_FIRST:
 *       return base
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:             # <<<<<<<<<<<<<<
 *       index = in_stream.read_var_int64()
 *       if base.timing == windowed_value.PaneInfoTiming.EARLY:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ONE_INDEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1397
 *       return base
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       index = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *       if base.timing == windowed_value.PaneInfoTiming.EARLY:
 *         nonspeculative_index = -1
 */
    __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_10 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1397, __pyx_L1_error)
    __pyx_v_index = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":1398
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       index = in_stream.read_var_int64()
 *       if base.timing == windowed_value.PaneInfoTiming.EARLY:             # <<<<<<<<<<<<<<
 *         nonspeculative_index = -1
 *       else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_timing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_windowed_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PaneInfoTiming); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_EARLY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1398, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":1399
 *       index = in_stream.read_var_int64()
 *       if base.timing == windowed_value.PaneInfoTiming.EARLY:
 *         nonspeculative_index = -1             # <<<<<<<<<<<<<<
 *       else:
 *         nonspeculative_index = index
 */
      __pyx_v_nonspeculative_index = -1L;

      /* "apache_beam/coders/coder_impl.py":1398
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       index = in_stream.read_var_int64()
 *       if base.timing == windowed_value.PaneInfoTiming.EARLY:             # <<<<<<<<<<<<<<
 *         nonspeculative_index = -1
 *       else:
 */
      goto __pyx_L4;
    }

    /* "apache_beam/coders/coder_impl.py":1401
 *         nonspeculative_index = -1
 *       else:
 *         nonspeculative_index = index             # <<<<<<<<<<<<<<
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 *       index = in_stream.read_var_int64()
 */
    /*else*/ {
      __pyx_v_nonspeculative_index = __pyx_v_index;
    }
    __pyx_L4:;

    /* "apache_beam/coders/coder_impl.py":1396
 *     if encoding_type == PaneInfoEncoding_FIRST:
 *       return base
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:             # <<<<<<<<<<<<<<
 *       index = in_stream.read_var_int64()
 *       if base.timing == windowed_value.PaneInfoTiming.EARLY:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1402
 *       else:
 *         nonspeculative_index = index
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:             # <<<<<<<<<<<<<<
 *       index = in_stream.read_var_int64()
 *       nonspeculative_index = in_stream.read_var_int64()
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_TWO_INDICES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(__pyx_t_9)) {

    /* "apache_beam/coders/coder_impl.py":1403
 *         nonspeculative_index = index
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 *       index = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *       nonspeculative_index = in_stream.read_var_int64()
 *     else:
 */
    __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_10 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1403, __pyx_L1_error)
    __pyx_v_index = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":1404
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 *       index = in_stream.read_var_int64()
 *       nonspeculative_index = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *     else:
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 */
    __pyx_t_10 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_10 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1404, __pyx_L1_error)
    __pyx_v_nonspeculative_index = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":1402
 *       else:
 *         nonspeculative_index = index
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:             # <<<<<<<<<<<<<<
 *       index = in_stream.read_var_int64()
 *       nonspeculative_index = in_stream.read_var_int64()
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1406
 *       nonspeculative_index = in_stream.read_var_int64()
 *     else:
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)             # <<<<<<<<<<<<<<
 *     return windowed_value.PaneInfo(
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_Invalid_PaneInfoEncoding_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1406, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":1407
 *     else:
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 *     return windowed_value.PaneInfo(             # <<<<<<<<<<<<<<
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":1408
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 *     return windowed_value.PaneInfo(
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_is_first); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_is_last); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_timing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyInt_From_int64_t(__pyx_v_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_nonspeculative_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/coders/coder_impl.py":1407
 *     else:
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 *     return windowed_value.PaneInfo(             # <<<<<<<<<<<<<<
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 */
  __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_3);
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_7 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1388
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> windowed_value.PaneInfo
 *     encoded_first_byte = in_stream.read_byte()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1388, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1388, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1388, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1388, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1388, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1410
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_size = NULL;
  int __pyx_v_encoding_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1410, __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, __pyx_v_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, 1410, __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, __pyx_v_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, 1410, __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, 1410, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 1410, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1414
 * 
 *     """Estimates the encoded size of the given value, in bytes."""
 *     size = 1             # <<<<<<<<<<<<<<
 *     encoding_type = self._choose_encoding(value)
 *     if encoding_type == PaneInfoEncoding.ONE_INDEX:
 */
  __Pyx_INCREF(__pyx_int_1);
  __pyx_v_size = __pyx_int_1;

  /* "apache_beam/coders/coder_impl.py":1415
 *     """Estimates the encoded size of the given value, in bytes."""
 *     size = 1
 *     encoding_type = self._choose_encoding(value)             # <<<<<<<<<<<<<<
 *     if encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       size += get_varint_size(value.index)
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo))))) __PYX_ERR(0, 1415, __pyx_L1_error)
  __pyx_v_encoding_type = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_choose_encoding(__pyx_v_self, ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_v_value));

  /* "apache_beam/coders/coder_impl.py":1416
 *     size = 1
 *     encoding_type = self._choose_encoding(value)
 *     if encoding_type == PaneInfoEncoding.ONE_INDEX:             # <<<<<<<<<<<<<<
 *       size += get_varint_size(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ONE_INDEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":1417
 *     encoding_type = self._choose_encoding(value)
 *     if encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       size += get_varint_size(value.index)             # <<<<<<<<<<<<<<
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 *       size += get_varint_size(value.index)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
    __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1416
 *     size = 1
 *     encoding_type = self._choose_encoding(value)
 *     if encoding_type == PaneInfoEncoding.ONE_INDEX:             # <<<<<<<<<<<<<<
 *       size += get_varint_size(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1418
 *     if encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       size += get_varint_size(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:             # <<<<<<<<<<<<<<
 *       size += get_varint_size(value.index)
 *       size += get_varint_size(value.nonspeculative_index)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_encoding_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TWO_INDICES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":1419
 *       size += get_varint_size(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 *       size += get_varint_size(value.index)             # <<<<<<<<<<<<<<
 *       size += get_varint_size(value.nonspeculative_index)
 *     return size
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
    __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1420
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:
 *       size += get_varint_size(value.index)
 *       size += get_varint_size(value.nonspeculative_index)             # <<<<<<<<<<<<<<
 *     return size
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_nonspeculative_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
    __pyx_t_4 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":1418
 *     if encoding_type == PaneInfoEncoding.ONE_INDEX:
 *       size += get_varint_size(value.index)
 *     elif encoding_type == PaneInfoEncoding.TWO_INDICES:             # <<<<<<<<<<<<<<
 *       size += get_varint_size(value.index)
 *       size += get_varint_size(value.nonspeculative_index)
 */
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":1421
 *       size += get_varint_size(value.index)
 *       size += get_varint_size(value.nonspeculative_index)
 *     return size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_size);
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1410
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size[] = "Estimates the encoded size of the given value, in bytes.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 1410, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1410, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1410, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_4estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_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_6coders_10coder_impl_17PaneInfoCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_PaneInfoCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_PaneInfoCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_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_6coders_10coder_impl_17PaneInfoCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.PaneInfoCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1433
 *   # TODO(https://github.com/apache/beam/issues/18190): Clean this up once we
 *   # have a BEAM wide consensus on byte representation of timestamps.
 *   def _to_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert "lexicographically ordered unsigned" to signed."""
 *     return value - _TIME_SHIFT
 */

static uint64_t __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, int64_t __pyx_v_value) {
  uint64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_to_normal_time", 0);

  /* "apache_beam/coders/coder_impl.py":1435
 *   def _to_normal_time(self, value):
 *     """Convert "lexicographically ordered unsigned" to signed."""
 *     return value - _TIME_SHIFT             # <<<<<<<<<<<<<<
 * 
 *   def _from_normal_time(self, value):
 */
  __pyx_r = (__pyx_v_value - __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT);
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1433
 *   # TODO(https://github.com/apache/beam/issues/18190): Clean this up once we
 *   # have a BEAM wide consensus on byte representation of timestamps.
 *   def _to_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert "lexicographically ordered unsigned" to signed."""
 *     return value - _TIME_SHIFT
 */

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

/* "apache_beam/coders/coder_impl.py":1437
 *     return value - _TIME_SHIFT
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + _TIME_SHIFT
 */

static int64_t __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, uint64_t __pyx_v_value) {
  int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_normal_time", 0);

  /* "apache_beam/coders/coder_impl.py":1439
 *   def _from_normal_time(self, value):
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + _TIME_SHIFT             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self, value_coder, timestamp_coder, window_coder):
 */
  __pyx_r = (__pyx_v_value + __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT);
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1437
 *     return value - _TIME_SHIFT
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + _TIME_SHIFT
 */

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

/* "apache_beam/coders/coder_impl.py":1441
 *     return value + _TIME_SHIFT
 * 
 *   def __init__(self, value_coder, timestamp_coder, window_coder):             # <<<<<<<<<<<<<<
 *     # TODO(lcwik): Remove the timestamp coder field
 *     self._value_coder = value_coder
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value_coder = 0;
  PyObject *__pyx_v_timestamp_coder = 0;
  PyObject *__pyx_v_window_coder = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value_coder,&__pyx_n_s_timestamp_coder,&__pyx_n_s_window_coder,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_value_coder)) != 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_timestamp_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1441, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1441, __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, 1441, __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_value_coder = values[0];
    __pyx_v_timestamp_coder = values[1];
    __pyx_v_window_coder = 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, 1441, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value_coder, __pyx_v_timestamp_coder, __pyx_v_window_coder);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_timestamp_coder, PyObject *__pyx_v_window_coder) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1443
 *   def __init__(self, value_coder, timestamp_coder, window_coder):
 *     # TODO(lcwik): Remove the timestamp coder field
 *     self._value_coder = value_coder             # <<<<<<<<<<<<<<
 *     self._timestamp_coder = timestamp_coder
 *     self._windows_coder = TupleSequenceCoderImpl(window_coder)
 */
  if (!(likely(((__pyx_v_value_coder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value_coder, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1443, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value_coder;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_value_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_value_coder));
  __pyx_v_self->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1444
 *     # TODO(lcwik): Remove the timestamp coder field
 *     self._value_coder = value_coder
 *     self._timestamp_coder = timestamp_coder             # <<<<<<<<<<<<<<
 *     self._windows_coder = TupleSequenceCoderImpl(window_coder)
 *     self._pane_info_coder = PaneInfoCoderImpl()
 */
  if (!(likely(((__pyx_v_timestamp_coder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_timestamp_coder, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1444, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_timestamp_coder;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_timestamp_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_timestamp_coder));
  __pyx_v_self->_timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1445
 *     self._value_coder = value_coder
 *     self._timestamp_coder = timestamp_coder
 *     self._windows_coder = TupleSequenceCoderImpl(window_coder)             # <<<<<<<<<<<<<<
 *     self._pane_info_coder = PaneInfoCoderImpl()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), __pyx_v_window_coder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_windows_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_windows_coder));
  __pyx_v_self->_windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1446
 *     self._timestamp_coder = timestamp_coder
 *     self._windows_coder = TupleSequenceCoderImpl(window_coder)
 *     self._pane_info_coder = PaneInfoCoderImpl()             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_pane_info_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_pane_info_coder));
  __pyx_v_self->_pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1441
 *     return value + _TIME_SHIFT
 * 
 *   def __init__(self, value_coder, timestamp_coder, window_coder):             # <<<<<<<<<<<<<<
 *     # TODO(lcwik): Remove the timestamp coder field
 *     self._value_coder = value_coder
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1448
 *     self._pane_info_coder = PaneInfoCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (windowed_value.WindowedValue, create_OutputStream, bool) -> None
 *     wv = value  # type cast
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) {
  struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_v_wv = 0;
  int __pyx_v_restore_sign;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int64_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1448, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1448, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1448, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1448, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1448, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1450
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (windowed_value.WindowedValue, create_OutputStream, bool) -> None
 *     wv = value  # type cast             # <<<<<<<<<<<<<<
 *     # Avoid creation of Timestamp object.
 *     restore_sign = -1 if wv.timestamp_micros < 0 else 1
 */
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue))))) __PYX_ERR(0, 1450, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_wv = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1452
 *     wv = value  # type cast
 *     # Avoid creation of Timestamp object.
 *     restore_sign = -1 if wv.timestamp_micros < 0 else 1             # <<<<<<<<<<<<<<
 *     out.write_bigendian_uint64(
 *         # Convert to postive number and divide, since python rounds off to the
 */
  if (((__pyx_v_wv->timestamp_micros < 0) != 0)) {
    __pyx_t_6 = -1;
  } else {
    __pyx_t_6 = 1;
  }
  __pyx_v_restore_sign = __pyx_t_6;

  /* "apache_beam/coders/coder_impl.py":1462
 *             restore_sign * (
 *                 abs(
 *                     MIN_TIMESTAMP_micros if wv.timestamp_micros <             # <<<<<<<<<<<<<<
 *                     MIN_TIMESTAMP_micros else wv.timestamp_micros) // 1000)))
 *     self._windows_coder.encode_to_stream(wv.windows, out, True)
 */
  if (((__pyx_v_wv->timestamp_micros < __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros) != 0)) {
    __pyx_t_8 = __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros;
  } else {

    /* "apache_beam/coders/coder_impl.py":1463
 *                 abs(
 *                     MIN_TIMESTAMP_micros if wv.timestamp_micros <
 *                     MIN_TIMESTAMP_micros else wv.timestamp_micros) // 1000)))             # <<<<<<<<<<<<<<
 *     self._windows_coder.encode_to_stream(wv.windows, out, True)
 *     # Default PaneInfo encoded byte representing NO_FIRING.
 */
    __pyx_t_8 = __pyx_v_wv->timestamp_micros;
  }

  /* "apache_beam/coders/coder_impl.py":1453
 *     # Avoid creation of Timestamp object.
 *     restore_sign = -1 if wv.timestamp_micros < 0 else 1
 *     out.write_bigendian_uint64(             # <<<<<<<<<<<<<<
 *         # Convert to postive number and divide, since python rounds off to the
 *         # lower negative number. For ex: -3 / 2 = -2, but we expect it to be -1,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_uint64(__pyx_v_out, ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_from_normal_time(__pyx_v_self, (__pyx_v_restore_sign * __Pyx_div_int64_t(llabs(__pyx_t_8), 0x3E8))), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1464
 *                     MIN_TIMESTAMP_micros if wv.timestamp_micros <
 *                     MIN_TIMESTAMP_micros else wv.timestamp_micros) // 1000)))
 *     self._windows_coder.encode_to_stream(wv.windows, out, True)             # <<<<<<<<<<<<<<
 *     # Default PaneInfo encoded byte representing NO_FIRING.
 *     self._pane_info_coder.encode_to_stream(wv.pane_info, out, True)
 */
  __pyx_t_1 = __pyx_v_wv->windows;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_windows_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_windows_coder, __pyx_t_1, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1466
 *     self._windows_coder.encode_to_stream(wv.windows, out, True)
 *     # Default PaneInfo encoded byte representing NO_FIRING.
 *     self._pane_info_coder.encode_to_stream(wv.pane_info, out, True)             # <<<<<<<<<<<<<<
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 */
  __pyx_t_2 = __pyx_v_wv->pane_info;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_pane_info_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_pane_info_coder, __pyx_t_2, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1467
 *     # Default PaneInfo encoded byte representing NO_FIRING.
 *     self._pane_info_coder.encode_to_stream(wv.pane_info, out, True)
 *     self._value_coder.encode_to_stream(wv.value, out, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_1 = __pyx_v_wv->value;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_value_coder, __pyx_t_1, __pyx_v_out, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1448
 *     self._pane_info_coder = PaneInfoCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (windowed_value.WindowedValue, create_OutputStream, bool) -> None
 *     wv = value  # type cast
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_wv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1448, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1448, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1448, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1448, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1448, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1448, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1469
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> windowed_value.WindowedValue
 *     timestamp = self._to_normal_time(in_stream.read_bigendian_uint64())
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  int64_t __pyx_v_timestamp;
  PyObject *__pyx_v_windows = NULL;
  PyObject *__pyx_v_pane_info = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  uint64_t __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __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_in_stream), __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, 1469, __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_in_stream), __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, 1469, __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, 1469, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1469, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1471
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> windowed_value.WindowedValue
 *     timestamp = self._to_normal_time(in_stream.read_bigendian_uint64())             # <<<<<<<<<<<<<<
 *     # Restore MIN/MAX timestamps to their actual values as encoding incurs loss
 *     # of precision while converting to millis.
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_bigendian_uint64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((uint64_t)-1LL) && PyErr_Occurred())) __PYX_ERR(0, 1471, __pyx_L1_error)
  __pyx_v_timestamp = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_to_normal_time(__pyx_v_self, __pyx_t_8);

  /* "apache_beam/coders/coder_impl.py":1478
 *     # TODO(https://github.com/apache/beam/issues/18190): Clean this up once we
 *     # have a BEAM wide consensus on precision of timestamps.
 *     if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000):             # <<<<<<<<<<<<<<
 *       timestamp = MIN_TIMESTAMP_micros
 *     elif timestamp >= MAX_TIMESTAMP_micros // 1000:
 */
  __pyx_t_9 = ((__pyx_v_timestamp <= (-__Pyx_div_int64_t(llabs(__pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros), 0x3E8))) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1479
 *     # have a BEAM wide consensus on precision of timestamps.
 *     if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000):
 *       timestamp = MIN_TIMESTAMP_micros             # <<<<<<<<<<<<<<
 *     elif timestamp >= MAX_TIMESTAMP_micros // 1000:
 *       timestamp = MAX_TIMESTAMP_micros
 */
    __pyx_v_timestamp = __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros;

    /* "apache_beam/coders/coder_impl.py":1478
 *     # TODO(https://github.com/apache/beam/issues/18190): Clean this up once we
 *     # have a BEAM wide consensus on precision of timestamps.
 *     if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000):             # <<<<<<<<<<<<<<
 *       timestamp = MIN_TIMESTAMP_micros
 *     elif timestamp >= MAX_TIMESTAMP_micros // 1000:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1480
 *     if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000):
 *       timestamp = MIN_TIMESTAMP_micros
 *     elif timestamp >= MAX_TIMESTAMP_micros // 1000:             # <<<<<<<<<<<<<<
 *       timestamp = MAX_TIMESTAMP_micros
 *     else:
 */
  __pyx_t_9 = ((__pyx_v_timestamp >= __Pyx_div_int64_t(__pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros, 0x3E8)) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1481
 *       timestamp = MIN_TIMESTAMP_micros
 *     elif timestamp >= MAX_TIMESTAMP_micros // 1000:
 *       timestamp = MAX_TIMESTAMP_micros             # <<<<<<<<<<<<<<
 *     else:
 *       timestamp *= 1000
 */
    __pyx_v_timestamp = __pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros;

    /* "apache_beam/coders/coder_impl.py":1480
 *     if timestamp <= -(abs(MIN_TIMESTAMP_micros) // 1000):
 *       timestamp = MIN_TIMESTAMP_micros
 *     elif timestamp >= MAX_TIMESTAMP_micros // 1000:             # <<<<<<<<<<<<<<
 *       timestamp = MAX_TIMESTAMP_micros
 *     else:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1483
 *       timestamp = MAX_TIMESTAMP_micros
 *     else:
 *       timestamp *= 1000             # <<<<<<<<<<<<<<
 * 
 *     windows = self._windows_coder.decode_from_stream(in_stream, True)
 */
  /*else*/ {
    __pyx_v_timestamp = (__pyx_v_timestamp * 0x3E8);
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":1485
 *       timestamp *= 1000
 * 
 *     windows = self._windows_coder.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *     # Read PaneInfo encoded byte.
 *     pane_info = self._pane_info_coder.decode_from_stream(in_stream, True)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_windows_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_windows_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_windows = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1487
 *     windows = self._windows_coder.decode_from_stream(in_stream, True)
 *     # Read PaneInfo encoded byte.
 *     pane_info = self._pane_info_coder.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *     value = self._value_coder.decode_from_stream(in_stream, nested)
 *     return windowed_value.create(
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_pane_info_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_pane_info_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pane_info = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1488
 *     # Read PaneInfo encoded byte.
 *     pane_info = self._pane_info_coder.decode_from_stream(in_stream, True)
 *     value = self._value_coder.decode_from_stream(in_stream, nested)             # <<<<<<<<<<<<<<
 *     return windowed_value.create(
 *         value,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_value_coder, __pyx_v_in_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1489
 *     pane_info = self._pane_info_coder.decode_from_stream(in_stream, True)
 *     value = self._value_coder.decode_from_stream(in_stream, nested)
 *     return windowed_value.create(             # <<<<<<<<<<<<<<
 *         value,
 *         timestamp,  # Avoid creation of Timestamp object.
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":1493
 *         timestamp,  # Avoid creation of Timestamp object.
 *         windows,
 *         pane_info)             # <<<<<<<<<<<<<<
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 */
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.pane_info = __pyx_v_pane_info;
  __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_create(__pyx_v_value, __pyx_v_timestamp, __pyx_v_windows, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1469
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> windowed_value.WindowedValue
 *     timestamp = self._to_normal_time(in_stream.read_bigendian_uint64())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_windows);
  __Pyx_XDECREF(__pyx_v_pane_info);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1469, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1469, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1469, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1469, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1495
 *         pane_info)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_estimated_size = NULL;
  PyObject *__pyx_v_observables = NULL;
  PyObject *__pyx_v_value_estimated_size = NULL;
  PyObject *__pyx_v_value_observables = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __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, __pyx_v_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, 1495, __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, __pyx_v_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, 1495, __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, 1495, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 1495, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1499
 * 
 *     """Returns estimated size of value along with any nested observables."""
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # Should never be here.
 *       # TODO(robertwb): Remove when coders are set correctly.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1502
 *       # Should never be here.
 *       # TODO(robertwb): Remove when coders are set correctly.
 *       return 0, [(value, self._value_coder)]             # <<<<<<<<<<<<<<
 *     estimated_size = 0
 *     observables = []  # type: Observables
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->_value_coder));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_value_coder));
    PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_value_coder));
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":1499
 * 
 *     """Returns estimated size of value along with any nested observables."""
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # Should never be here.
 *       # TODO(robertwb): Remove when coders are set correctly.
 */
  }

  /* "apache_beam/coders/coder_impl.py":1503
 *       # TODO(robertwb): Remove when coders are set correctly.
 *       return 0, [(value, self._value_coder)]
 *     estimated_size = 0             # <<<<<<<<<<<<<<
 *     observables = []  # type: Observables
 *     value_estimated_size, value_observables = (
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_estimated_size = __pyx_int_0;

  /* "apache_beam/coders/coder_impl.py":1504
 *       return 0, [(value, self._value_coder)]
 *     estimated_size = 0
 *     observables = []  # type: Observables             # <<<<<<<<<<<<<<
 *     value_estimated_size, value_observables = (
 *         self._value_coder.get_estimated_size_and_observables(
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_observables = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1507
 *     value_estimated_size, value_observables = (
 *         self._value_coder.get_estimated_size_and_observables(
 *             value.value, nested=nested))             # <<<<<<<<<<<<<<
 *     estimated_size += value_estimated_size
 *     observables += value_observables
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/coders/coder_impl.py":1506
 *     observables = []  # type: Observables
 *     value_estimated_size, value_observables = (
 *         self._value_coder.get_estimated_size_and_observables(             # <<<<<<<<<<<<<<
 *             value.value, nested=nested))
 *     estimated_size += value_estimated_size
 */
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.nested = __pyx_v_nested;
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->get_estimated_size_and_observables(__pyx_v_self->_value_coder, __pyx_t_2, 0, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  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, 1505, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1505, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1505, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }

  /* "apache_beam/coders/coder_impl.py":1505
 *     estimated_size = 0
 *     observables = []  # type: Observables
 *     value_estimated_size, value_observables = (             # <<<<<<<<<<<<<<
 *         self._value_coder.get_estimated_size_and_observables(
 *             value.value, nested=nested))
 */
  __pyx_v_value_estimated_size = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_value_observables = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "apache_beam/coders/coder_impl.py":1508
 *         self._value_coder.get_estimated_size_and_observables(
 *             value.value, nested=nested))
 *     estimated_size += value_estimated_size             # <<<<<<<<<<<<<<
 *     observables += value_observables
 *     estimated_size += (
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_v_value_estimated_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1509
 *             value.value, nested=nested))
 *     estimated_size += value_estimated_size
 *     observables += value_observables             # <<<<<<<<<<<<<<
 *     estimated_size += (
 *         self._timestamp_coder.estimate_size(value.timestamp, nested=True))
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_observables, __pyx_v_value_observables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_observables, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1511
 *     observables += value_observables
 *     estimated_size += (
 *         self._timestamp_coder.estimate_size(value.timestamp, nested=True))             # <<<<<<<<<<<<<<
 *     estimated_size += (
 *         self._windows_coder.estimate_size(value.windows, nested=True))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.nested = 1;
  __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_timestamp_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_timestamp_coder, __pyx_t_1, 0, &__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1510
 *     estimated_size += value_estimated_size
 *     observables += value_observables
 *     estimated_size += (             # <<<<<<<<<<<<<<
 *         self._timestamp_coder.estimate_size(value.timestamp, nested=True))
 *     estimated_size += (
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1513
 *         self._timestamp_coder.estimate_size(value.timestamp, nested=True))
 *     estimated_size += (
 *         self._windows_coder.estimate_size(value.windows, nested=True))             # <<<<<<<<<<<<<<
 *     estimated_size += (
 *         self._pane_info_coder.estimate_size(value.pane_info, nested=True))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_windows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.nested = 1;
  __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_windows_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_windows_coder, __pyx_t_1, 0, &__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1512
 *     estimated_size += (
 *         self._timestamp_coder.estimate_size(value.timestamp, nested=True))
 *     estimated_size += (             # <<<<<<<<<<<<<<
 *         self._windows_coder.estimate_size(value.windows, nested=True))
 *     estimated_size += (
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1515
 *         self._windows_coder.estimate_size(value.windows, nested=True))
 *     estimated_size += (
 *         self._pane_info_coder.estimate_size(value.pane_info, nested=True))             # <<<<<<<<<<<<<<
 *     return estimated_size, observables
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_pane_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.nested = 1;
  __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_pane_info_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_pane_info_coder, __pyx_t_1, 0, &__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1514
 *     estimated_size += (
 *         self._windows_coder.estimate_size(value.windows, nested=True))
 *     estimated_size += (             # <<<<<<<<<<<<<<
 *         self._pane_info_coder.estimate_size(value.pane_info, nested=True))
 *     return estimated_size, observables
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1516
 *     estimated_size += (
 *         self._pane_info_coder.estimate_size(value.pane_info, nested=True))
 *     return estimated_size, observables             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_estimated_size);
  __Pyx_GIVEREF(__pyx_v_estimated_size);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_estimated_size);
  __Pyx_INCREF(__pyx_v_observables);
  __Pyx_GIVEREF(__pyx_v_observables);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_observables);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1495
 *         pane_info)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_estimated_size);
  __Pyx_XDECREF(__pyx_v_observables);
  __Pyx_XDECREF(__pyx_v_value_estimated_size);
  __Pyx_XDECREF(__pyx_v_value_observables);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables[] = "Returns estimated size of value along with any nested observables.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_estimated_size_and_observables") < 0)) __PYX_ERR(0, 1495, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1495, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_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_6coders_10coder_impl_22WindowedValueCoderImpl_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_pane_info_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_pane_info_coder));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_pane_info_coder));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_timestamp_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_timestamp_coder));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->_timestamp_coder));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_value_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_value_coder));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->_value_coder));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_windows_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_windows_coder));
  PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_self->_windows_coder));
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->_pane_info_coder) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_timestamp_coder) != 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->_value_coder) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_windows_coder) != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None
 *     if use_setstate:
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_WindowedValueCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_133669511);
    __Pyx_GIVEREF(__pyx_int_133669511);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_133669511);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, None), state
 *     else:
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_WindowedValueCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_133669511);
    __Pyx_GIVEREF(__pyx_int_133669511);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_133669511);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_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_6coders_10coder_impl_22WindowedValueCoderImpl_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.WindowedValueCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1527
 *   and pane info values during decoding when reconstructing the windowed
 *   value."""
 *   def __init__(self, value_coder, window_coder, payload):             # <<<<<<<<<<<<<<
 *     super().__init__(value_coder, TimestampCoderImpl(), window_coder)
 *     self._timestamp, self._windows, self._pane_info = self._from_proto(
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value_coder = 0;
  PyObject *__pyx_v_window_coder = 0;
  PyObject *__pyx_v_payload = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value_coder,&__pyx_n_s_window_coder,&__pyx_n_s_payload,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_value_coder)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1527, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_payload)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1527, __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, 1527, __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_value_coder = values[0];
    __pyx_v_window_coder = values[1];
    __pyx_v_payload = 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, 1527, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value_coder, __pyx_v_window_coder, __pyx_v_payload);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder, PyObject *__pyx_v_window_coder, PyObject *__pyx_v_payload) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int64_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1528
 *   value."""
 *   def __init__(self, value_coder, window_coder, payload):
 *     super().__init__(value_coder, TimestampCoderImpl(), window_coder)             # <<<<<<<<<<<<<<
 *     self._timestamp, self._windows, self._pane_info = self._from_proto(
 *         payload, window_coder)
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl));
  __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, 1528, __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, 1528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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[4] = {__pyx_t_4, __pyx_v_value_coder, __pyx_t_3, __pyx_v_window_coder};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __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[4] = {__pyx_t_4, __pyx_v_value_coder, __pyx_t_3, __pyx_v_window_coder};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __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(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1528, __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_value_coder);
    __Pyx_GIVEREF(__pyx_v_value_coder);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_value_coder);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_window_coder);
    __Pyx_GIVEREF(__pyx_v_window_coder);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_window_coder);
    __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, 1528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1529
 *   def __init__(self, value_coder, window_coder, payload):
 *     super().__init__(value_coder, TimestampCoderImpl(), window_coder)
 *     self._timestamp, self._windows, self._pane_info = self._from_proto(             # <<<<<<<<<<<<<<
 *         payload, window_coder)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_proto); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/coders/coder_impl.py":1530
 *     super().__init__(value_coder, TimestampCoderImpl(), window_coder)
 *     self._timestamp, self._windows, self._pane_info = self._from_proto(
 *         payload, window_coder)             # <<<<<<<<<<<<<<
 * 
 *   def _from_proto(self, payload, window_coder):
 */
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_payload, __pyx_v_window_coder};
    __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, 1529, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_payload, __pyx_v_window_coder};
    __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, 1529, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_payload);
    __Pyx_GIVEREF(__pyx_v_payload);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_v_payload);
    __Pyx_INCREF(__pyx_v_window_coder);
    __Pyx_GIVEREF(__pyx_v_window_coder);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_window_coder);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1529, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_6);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 2; __pyx_t_6 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 3) < 0) __PYX_ERR(0, 1529, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1529, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }

  /* "apache_beam/coders/coder_impl.py":1529
 *   def __init__(self, value_coder, window_coder, payload):
 *     super().__init__(value_coder, TimestampCoderImpl(), window_coder)
 *     self._timestamp, self._windows, self._pane_info = self._from_proto(             # <<<<<<<<<<<<<<
 *         payload, window_coder)
 * 
 */
  __pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo))))) __PYX_ERR(0, 1529, __pyx_L1_error)
  __pyx_v_self->_timestamp = __pyx_t_8;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_windows);
  __Pyx_DECREF(__pyx_v_self->_windows);
  __pyx_v_self->_windows = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->_pane_info);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_pane_info));
  __pyx_v_self->_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "apache_beam/coders/coder_impl.py":1527
 *   and pane info values during decoding when reconstructing the windowed
 *   value."""
 *   def __init__(self, value_coder, window_coder, payload):             # <<<<<<<<<<<<<<
 *     super().__init__(value_coder, TimestampCoderImpl(), window_coder)
 *     self._timestamp, self._windows, self._pane_info = self._from_proto(
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1532
 *         payload, window_coder)
 * 
 *   def _from_proto(self, payload, window_coder):             # <<<<<<<<<<<<<<
 *     windowed_value_coder = WindowedValueCoderImpl(
 *         BytesCoderImpl(), TimestampCoderImpl(), window_coder)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto = {"_from_proto", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_payload = 0;
  PyObject *__pyx_v_window_coder = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_proto (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_payload,&__pyx_n_s_window_coder,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_payload)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_from_proto", 1, 2, 2, 1); __PYX_ERR(0, 1532, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_from_proto") < 0)) __PYX_ERR(0, 1532, __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_payload = values[0];
    __pyx_v_window_coder = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_proto", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1532, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl._from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_2_from_proto(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_payload, __pyx_v_window_coder);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_2_from_proto(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_payload, PyObject *__pyx_v_window_coder) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_windowed_value_coder = NULL;
  PyObject *__pyx_v_wv = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_proto", 0);

  /* "apache_beam/coders/coder_impl.py":1534
 *   def _from_proto(self, payload, window_coder):
 *     windowed_value_coder = WindowedValueCoderImpl(
 *         BytesCoderImpl(), TimestampCoderImpl(), window_coder)             # <<<<<<<<<<<<<<
 *     wv = windowed_value_coder.decode(payload)
 *     return wv.timestamp_micros, wv.windows, wv.pane_info
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/coders/coder_impl.py":1533
 * 
 *   def _from_proto(self, payload, window_coder):
 *     windowed_value_coder = WindowedValueCoderImpl(             # <<<<<<<<<<<<<<
 *         BytesCoderImpl(), TimestampCoderImpl(), window_coder)
 *     wv = windowed_value_coder.decode(payload)
 */
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_window_coder);
  __Pyx_GIVEREF(__pyx_v_window_coder);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_window_coder);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_windowed_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1535
 *     windowed_value_coder = WindowedValueCoderImpl(
 *         BytesCoderImpl(), TimestampCoderImpl(), window_coder)
 *     wv = windowed_value_coder.decode(payload)             # <<<<<<<<<<<<<<
 *     return wv.timestamp_micros, wv.windows, wv.pane_info
 * 
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_payload))||((__pyx_v_payload) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_payload)->tp_name), 0))) __PYX_ERR(0, 1535, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_windowed_value_coder->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_windowed_value_coder), ((PyObject*)__pyx_v_payload), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_wv = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1536
 *         BytesCoderImpl(), TimestampCoderImpl(), window_coder)
 *     wv = windowed_value_coder.decode(payload)
 *     return wv.timestamp_micros, wv.windows, wv.pane_info             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_wv, __pyx_n_s_timestamp_micros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_wv, __pyx_n_s_windows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wv, __pyx_n_s_pane_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1532
 *         payload, window_coder)
 * 
 *   def _from_proto(self, payload, window_coder):             # <<<<<<<<<<<<<<
 *     windowed_value_coder = WindowedValueCoderImpl(
 *         BytesCoderImpl(), TimestampCoderImpl(), window_coder)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl._from_proto", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_windowed_value_coder);
  __Pyx_XDECREF(__pyx_v_wv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1538
 *     return wv.timestamp_micros, wv.windows, wv.pane_info
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     wv = value  # type cast
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_wv = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1538, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1538, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1538, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1538, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1539
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     wv = value  # type cast             # <<<<<<<<<<<<<<
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 */
  __Pyx_INCREF(__pyx_v_value);
  __pyx_v_wv = __pyx_v_value;

  /* "apache_beam/coders/coder_impl.py":1540
 *   def encode_to_stream(self, value, out, nested):
 *     wv = value  # type cast
 *     self._value_coder.encode_to_stream(wv.value, out, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_wv, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_base._value_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->__pyx_base._value_coder, __pyx_t_1, __pyx_v_out, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1538
 *     return wv.timestamp_micros, wv.windows, wv.pane_info
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     wv = value  # type cast
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1538, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1538, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1538, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1538, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1538, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1538, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_4encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_4encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1542
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value = self._value_coder.decode_from_stream(in_stream, nested)
 *     return windowed_value.create(
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __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_in_stream), __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, 1542, __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_in_stream), __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, 1542, __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, 1542, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1542, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1543
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     value = self._value_coder.decode_from_stream(in_stream, nested)             # <<<<<<<<<<<<<<
 *     return windowed_value.create(
 *         value, self._timestamp, self._windows, self._pane_info)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_base._value_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->__pyx_base._value_coder, __pyx_v_in_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1544
 *   def decode_from_stream(self, in_stream, nested):
 *     value = self._value_coder.decode_from_stream(in_stream, nested)
 *     return windowed_value.create(             # <<<<<<<<<<<<<<
 *         value, self._timestamp, self._windows, self._pane_info)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":1545
 *     value = self._value_coder.decode_from_stream(in_stream, nested)
 *     return windowed_value.create(
 *         value, self._timestamp, self._windows, self._pane_info)             # <<<<<<<<<<<<<<
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 */
  __pyx_t_1 = __pyx_v_self->_windows;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_pane_info);
  __Pyx_INCREF(__pyx_t_2);

  /* "apache_beam/coders/coder_impl.py":1544
 *   def decode_from_stream(self, in_stream, nested):
 *     value = self._value_coder.decode_from_stream(in_stream, nested)
 *     return windowed_value.create(             # <<<<<<<<<<<<<<
 *         value, self._timestamp, self._windows, self._pane_info)
 * 
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.pane_info = __pyx_t_2;
  __pyx_t_4 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_create(__pyx_v_value, __pyx_v_self->_timestamp, __pyx_t_1, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1542
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value = self._value_coder.decode_from_stream(in_stream, nested)
 *     return windowed_value.create(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1542, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1542, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1542, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_6decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_6decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1547
 *         value, self._timestamp, self._windows, self._pane_info)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     if isinstance(value, observable.ObservableMixin):
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_estimated_size = NULL;
  PyObject *__pyx_v_observables = NULL;
  PyObject *__pyx_v_value_estimated_size = NULL;
  PyObject *__pyx_v_value_observables = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_estimated_size_and_observabl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __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, __pyx_v_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, 1547, __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, __pyx_v_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, 1547, __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, 1547, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 1547, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1549
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     """Returns estimated size of value along with any nested observables."""
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # Should never be here.
 *       # TODO(robertwb): Remove when coders are set correctly.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1552
 *       # Should never be here.
 *       # TODO(robertwb): Remove when coders are set correctly.
 *       return 0, [(value, self._value_coder)]             # <<<<<<<<<<<<<<
 *     estimated_size = 0
 *     observables = []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._value_coder));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._value_coder));
    PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->__pyx_base._value_coder));
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":1549
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     """Returns estimated size of value along with any nested observables."""
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # Should never be here.
 *       # TODO(robertwb): Remove when coders are set correctly.
 */
  }

  /* "apache_beam/coders/coder_impl.py":1553
 *       # TODO(robertwb): Remove when coders are set correctly.
 *       return 0, [(value, self._value_coder)]
 *     estimated_size = 0             # <<<<<<<<<<<<<<
 *     observables = []
 *     value_estimated_size, value_observables = (
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_estimated_size = __pyx_int_0;

  /* "apache_beam/coders/coder_impl.py":1554
 *       return 0, [(value, self._value_coder)]
 *     estimated_size = 0
 *     observables = []             # <<<<<<<<<<<<<<
 *     value_estimated_size, value_observables = (
 *         self._value_coder.get_estimated_size_and_observables(
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_observables = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1557
 *     value_estimated_size, value_observables = (
 *         self._value_coder.get_estimated_size_and_observables(
 *             value.value, nested=nested))             # <<<<<<<<<<<<<<
 *     estimated_size += value_estimated_size
 *     observables += value_observables
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/coders/coder_impl.py":1556
 *     observables = []
 *     value_estimated_size, value_observables = (
 *         self._value_coder.get_estimated_size_and_observables(             # <<<<<<<<<<<<<<
 *             value.value, nested=nested))
 *     estimated_size += value_estimated_size
 */
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.nested = __pyx_v_nested;
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_base._value_coder->__pyx_vtab)->get_estimated_size_and_observables(__pyx_v_self->__pyx_base._value_coder, __pyx_t_2, 0, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1555, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1555, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1555, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }

  /* "apache_beam/coders/coder_impl.py":1555
 *     estimated_size = 0
 *     observables = []
 *     value_estimated_size, value_observables = (             # <<<<<<<<<<<<<<
 *         self._value_coder.get_estimated_size_and_observables(
 *             value.value, nested=nested))
 */
  __pyx_v_value_estimated_size = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_value_observables = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "apache_beam/coders/coder_impl.py":1558
 *         self._value_coder.get_estimated_size_and_observables(
 *             value.value, nested=nested))
 *     estimated_size += value_estimated_size             # <<<<<<<<<<<<<<
 *     observables += value_observables
 *     return estimated_size, observables
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_v_value_estimated_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1559
 *             value.value, nested=nested))
 *     estimated_size += value_estimated_size
 *     observables += value_observables             # <<<<<<<<<<<<<<
 *     return estimated_size, observables
 * 
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_observables, __pyx_v_value_observables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_observables, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1560
 *     estimated_size += value_estimated_size
 *     observables += value_observables
 *     return estimated_size, observables             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_estimated_size);
  __Pyx_GIVEREF(__pyx_v_estimated_size);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_estimated_size);
  __Pyx_INCREF(__pyx_v_observables);
  __Pyx_GIVEREF(__pyx_v_observables);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_observables);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1547
 *         value, self._timestamp, self._windows, self._pane_info)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     if isinstance(value, observable.ObservableMixin):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_estimated_size);
  __Pyx_XDECREF(__pyx_v_observables);
  __Pyx_XDECREF(__pyx_v_value_estimated_size);
  __Pyx_XDECREF(__pyx_v_value_observables);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables[] = "Returns estimated size of value along with any nested observables.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_estimated_size_and_observables") < 0)) __PYX_ERR(0, 1547, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1547, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_estimated_size_and_observables", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1547, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_estimated_size_and_observables", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->__pyx_base.__pyx_base.__pyx_base.get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.get_estimated_size_and_observables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.pxd":245
 * cdef class ParamWindowedValueCoderImpl(WindowedValueCoderImpl):
 *   """A coder for windowed values with constant timestamp, windows and pane info."""
 *   cdef readonly libc.stdint.int64_t _timestamp             # <<<<<<<<<<<<<<
 *   cdef readonly object _windows
 *   cdef readonly windowed_value.PaneInfo _pane_info
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp___get__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl._timestamp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.pxd":246
 *   """A coder for windowed values with constant timestamp, windows and pane info."""
 *   cdef readonly libc.stdint.int64_t _timestamp
 *   cdef readonly object _windows             # <<<<<<<<<<<<<<
 *   cdef readonly windowed_value.PaneInfo _pane_info
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows___get__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_windows);
  __pyx_r = __pyx_v_self->_windows;
  goto __pyx_L0;

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

/* "apache_beam/coders/coder_impl.pxd":247
 *   cdef readonly libc.stdint.int64_t _timestamp
 *   cdef readonly object _windows
 *   cdef readonly windowed_value.PaneInfo _pane_info             # <<<<<<<<<<<<<<
 * 
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info___get__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info___get__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_pane_info));
  __pyx_r = ((PyObject *)__pyx_v_self->_pane_info);
  goto __pyx_L0;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_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_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._pane_info, self._pane_info_coder, self._timestamp, self._timestamp_coder, self._value_coder, self._windows, self._windows_coder)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_pane_info));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_pane_info));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->_pane_info));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._pane_info_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._pane_info_coder));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->__pyx_base._pane_info_coder));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._timestamp_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._timestamp_coder));
  PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_v_self->__pyx_base._timestamp_coder));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._value_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._value_coder));
  PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_v_self->__pyx_base._value_coder));
  __Pyx_INCREF(__pyx_v_self->_windows);
  __Pyx_GIVEREF(__pyx_v_self->_windows);
  PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_self->_windows);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._windows_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._windows_coder));
  PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_v_self->__pyx_base._windows_coder));
  __pyx_t_1 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._pane_info, self._pane_info_coder, self._timestamp, self._timestamp_coder, self._value_coder, self._windows, self._windows_coder)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v__dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "(tree fragment)":7
 *     state = (self._pane_info, self._pane_info_coder, self._timestamp, self._timestamp_coder, self._value_coder, self._windows, self._windows_coder)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_3 = (__pyx_v__dict != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._pane_info, self._pane_info_coder, self._timestamp, self._timestamp_coder, self._value_coder, self._windows, self._windows_coder)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->_pane_info) != 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._pane_info_coder) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base._timestamp_coder) != 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._value_coder) != Py_None);
    __pyx_t_3 = (__pyx_t_5 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_4 = __pyx_t_3;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_3 = (__pyx_v_self->_windows != 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._windows_coder) != 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)":12
 *     else:
 *         use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, None), state
 *     else:
 */
  __pyx_t_4 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_4) {

    /* "(tree fragment)":13
 *         use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None
 *     if use_setstate:
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_ParamWindowedValu); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_140638058);
    __Pyx_GIVEREF(__pyx_int_140638058);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_140638058);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._pane_info is not None or self._pane_info_coder is not None or self._timestamp_coder is not None or self._value_coder is not None or self._windows is not None or self._windows_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, None), state
 *     else:
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_ParamWindowedValu); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_140638058);
    __Pyx_GIVEREF(__pyx_int_140638058);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_140638058);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_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_6coders_10coder_impl_27ParamWindowedValueCoderImpl_12__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_12__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1567
 * 
 *   Coder which prefixes the length of the encoded object in the stream."""
 *   def __init__(self, value_coder):             # <<<<<<<<<<<<<<
 *     # type: (CoderImpl) -> None
 *     self._value_coder = value_coder
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value_coder = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value_coder,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_coder)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1567, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_value_coder = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1567, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), __pyx_v_value_coder);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value_coder) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1569
 *   def __init__(self, value_coder):
 *     # type: (CoderImpl) -> None
 *     self._value_coder = value_coder             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  if (!(likely(((__pyx_v_value_coder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value_coder, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1569, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value_coder;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_value_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_value_coder));
  __pyx_v_self->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1567
 * 
 *   Coder which prefixes the length of the encoded object in the stream."""
 *   def __init__(self, value_coder):             # <<<<<<<<<<<<<<
 *     # type: (CoderImpl) -> None
 *     self._value_coder = value_coder
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1571
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     encoded_value = self._value_coder.encode(value)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_encoded_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1571, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1571, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1571, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1571, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1571, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1573
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (Any, create_OutputStream, bool) -> None
 *     encoded_value = self._value_coder.encode(value)             # <<<<<<<<<<<<<<
 *     out.write_var_int64(len(encoded_value))
 *     out.write(encoded_value)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->encode(__pyx_v_self->_value_coder, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_encoded_value = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1574
 *     # type: (Any, create_OutputStream, bool) -> None
 *     encoded_value = self._value_coder.encode(value)
 *     out.write_var_int64(len(encoded_value))             # <<<<<<<<<<<<<<
 *     out.write(encoded_value)
 * 
 */
  if (unlikely(__pyx_v_encoded_value == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1574, __pyx_L1_error)
  }
  __pyx_t_8 = PyBytes_GET_SIZE(__pyx_v_encoded_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1574, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1575
 *     encoded_value = self._value_coder.encode(value)
 *     out.write_var_int64(len(encoded_value))
 *     out.write(encoded_value)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, __pyx_v_encoded_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1571
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     encoded_value = self._value_coder.encode(value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encoded_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1571, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1571, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1571, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1571, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1571, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1571, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1577
 *     out.write(encoded_value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     value_length = in_stream.read_var_int64()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  int64_t __pyx_v_value_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int64_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1577, __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_in_stream), __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, 1577, __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_in_stream), __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, 1577, __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, 1577, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1577, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1579
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> Any
 *     value_length = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1579, __pyx_L1_error)
  __pyx_v_value_length = __pyx_t_8;

  /* "apache_beam/coders/coder_impl.py":1580
 *     # type: (create_InputStream, bool) -> Any
 *     value_length = in_stream.read_var_int64()
 *     return self._value_coder.decode(in_stream.read(value_length))             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read(__pyx_v_in_stream, __pyx_v_value_length, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->decode(__pyx_v_self->_value_coder, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1577
 *     out.write(encoded_value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     value_length = in_stream.read_var_int64()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1577, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1577, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1577, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1577, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1577, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1582
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     value_size = self._value_coder.estimate_size(value)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size *__pyx_optional_args) {
  int __pyx_v_nested = ((int)0);
  PyObject *__pyx_v_value_size = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nested = __pyx_optional_args->nested;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1582, __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, __pyx_v_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, 1582, __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, __pyx_v_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, 1582, __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, 1582, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_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, 1582, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1584
 *   def estimate_size(self, value, nested=False):
 *     # type: (Any, bool) -> int
 *     value_size = self._value_coder.estimate_size(value)             # <<<<<<<<<<<<<<
 *     return get_varint_size(value_size) + value_size
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_value_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_value_coder, __pyx_v_value, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value_size = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1585
 *     # type: (Any, bool) -> int
 *     value_size = self._value_coder.estimate_size(value)
 *     return get_varint_size(value_size) + value_size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
  __pyx_t_2 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_value_size) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value_size);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_value_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1582
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     value_size = self._value_coder.estimate_size(value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_nested,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_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_nested);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 1582, __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_value = values[0];
    if (values[1]) {
      __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1582, __pyx_L3_error)
    } else {
      __pyx_v_nested = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1582, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_6estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_6estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nested = __pyx_v_nested;
  __pyx_t_1 = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self), __pyx_v_value, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_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_6coders_10coder_impl_21LengthPrefixCoderImpl_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._value_coder,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_value_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_value_coder));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_value_coder));
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._value_coder,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._value_coder,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._value_coder is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._value_coder,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._value_coder is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->_value_coder) != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._value_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._value_coder is not None
 *     if use_setstate:
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LengthPrefixCoder); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_91790965);
    __Pyx_GIVEREF(__pyx_int_91790965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_91790965);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._value_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, None), state
 *     else:
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_LengthPrefixCoder); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_91790965);
    __Pyx_GIVEREF(__pyx_int_91790965);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_91790965);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_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_6coders_10coder_impl_21LengthPrefixCoderImpl_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1597
 *       encoded user key
 *   """
 *   def __init__(self, key_coder_impl):             # <<<<<<<<<<<<<<
 *     self._shard_id_coder_impl = BytesCoderImpl()
 *     self._key_coder_impl = key_coder_impl
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key_coder_impl = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key_coder_impl,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_key_coder_impl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1597, __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, 1597, __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_key_coder_impl = 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, 1597, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_key_coder_impl);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key_coder_impl) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1598
 *   """
 *   def __init__(self, key_coder_impl):
 *     self._shard_id_coder_impl = BytesCoderImpl()             # <<<<<<<<<<<<<<
 *     self._key_coder_impl = key_coder_impl
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_shard_id_coder_impl, __pyx_t_1) < 0) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1599
 *   def __init__(self, key_coder_impl):
 *     self._shard_id_coder_impl = BytesCoderImpl()
 *     self._key_coder_impl = key_coder_impl             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_key_coder_impl_2, __pyx_v_key_coder_impl) < 0) __PYX_ERR(0, 1599, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1597
 *       encoded user key
 *   """
 *   def __init__(self, key_coder_impl):             # <<<<<<<<<<<<<<
 *     self._shard_id_coder_impl = BytesCoderImpl()
 *     self._key_coder_impl = key_coder_impl
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1601
 *     self._key_coder_impl = key_coder_impl
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (ShardedKey, create_OutputStream, bool) -> None
 *     self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_out = 0;
  CYTHON_UNUSED PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 1); __PYX_ERR(0, 1601, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 2); __PYX_ERR(0, 1601, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 3); __PYX_ERR(0, 1601, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1601, __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_self = values[0];
    __pyx_v_value = values[1];
    __pyx_v_out = values[2];
    __pyx_v_nested = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1601, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_2encode_to_stream(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_out, CYTHON_UNUSED PyObject *__pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);

  /* "apache_beam/coders/coder_impl.py":1603
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (ShardedKey, create_OutputStream, bool) -> None
 *     self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True)             # <<<<<<<<<<<<<<
 *     self._key_coder_impl.encode_to_stream(value.key, out, True)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shard_id_coder_impl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_shard_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_out);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, Py_True);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1604
 *     # type: (ShardedKey, create_OutputStream, bool) -> None
 *     self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True)
 *     self._key_coder_impl.encode_to_stream(value.key, out, True)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_key_coder_impl_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_6)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_3, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __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_6)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_3, __pyx_v_out, Py_True};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __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_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1604, __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_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_out);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, Py_True);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1601
 *     self._key_coder_impl = key_coder_impl
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (ShardedKey, create_OutputStream, bool) -> None
 *     self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1606
 *     self._key_coder_impl.encode_to_stream(value.key, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> ShardedKey
 *     shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_in_stream = 0;
  CYTHON_UNUSED PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, 1); __PYX_ERR(0, 1606, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, 2); __PYX_ERR(0, 1606, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1606, __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_in_stream = values[1];
    __pyx_v_nested = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1606, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_4decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_stream, CYTHON_UNUSED PyObject *__pyx_v_nested) {
  PyObject *__pyx_v_shard_id = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);

  /* "apache_beam/coders/coder_impl.py":1608
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> ShardedKey
 *     shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *     key = self._key_coder_impl.decode_from_stream(in_stream, True)
 *     return ShardedKey(key=key, shard_id=shard_id)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shard_id_coder_impl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_in_stream, Py_True};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __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_v_in_stream, Py_True};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1608, __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_in_stream);
    __Pyx_GIVEREF(__pyx_v_in_stream);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_in_stream);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, Py_True);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __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_v_shard_id = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1609
 *     # type: (create_InputStream, bool) -> ShardedKey
 *     shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True)
 *     key = self._key_coder_impl.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *     return ShardedKey(key=key, shard_id=shard_id)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_key_coder_impl_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_in_stream, Py_True};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __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_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_in_stream, Py_True};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_in_stream);
    __Pyx_GIVEREF(__pyx_v_in_stream);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_4, __pyx_v_in_stream);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_4, Py_True);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __pyx_L1_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_v_key = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1610
 *     shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True)
 *     key = self._key_coder_impl.decode_from_stream(in_stream, True)
 *     return ShardedKey(key=key, shard_id=shard_id)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ShardedKey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_key, __pyx_v_key) < 0) __PYX_ERR(0, 1610, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_shard_id_2, __pyx_v_shard_id) < 0) __PYX_ERR(0, 1610, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1610, __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_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1606
 *     self._key_coder_impl.encode_to_stream(value.key, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> ShardedKey
 *     shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_shard_id);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1612
 *     return ShardedKey(key=key, shard_id=shard_id)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     estimated_size = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_nested,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, 1); __PYX_ERR(0, 1612, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 1612, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
    __pyx_v_nested = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1612, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_6estimate_size(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_nested) {
  PyObject *__pyx_v_estimated_size = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);

  /* "apache_beam/coders/coder_impl.py":1614
 *   def estimate_size(self, value, nested=False):
 *     # type: (Any, bool) -> int
 *     estimated_size = 0             # <<<<<<<<<<<<<<
 *     estimated_size += (
 *         self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True))
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_estimated_size = __pyx_int_0;

  /* "apache_beam/coders/coder_impl.py":1616
 *     estimated_size = 0
 *     estimated_size += (
 *         self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True))             # <<<<<<<<<<<<<<
 *     estimated_size += (
 *         self._key_coder_impl.estimate_size(value.key, nested=True))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shard_id_coder_impl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_shard_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nested, Py_True) < 0) __PYX_ERR(0, 1616, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1615
 *     # type: (Any, bool) -> int
 *     estimated_size = 0
 *     estimated_size += (             # <<<<<<<<<<<<<<
 *         self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True))
 *     estimated_size += (
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1618
 *         self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True))
 *     estimated_size += (
 *         self._key_coder_impl.estimate_size(value.key, nested=True))             # <<<<<<<<<<<<<<
 *     return estimated_size
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_key_coder_impl_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nested, Py_True) < 0) __PYX_ERR(0, 1618, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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/coders/coder_impl.py":1617
 *     estimated_size += (
 *         self._shard_id_coder_impl.estimate_size(value._shard_id, nested=True))
 *     estimated_size += (             # <<<<<<<<<<<<<<
 *         self._key_coder_impl.estimate_size(value.key, nested=True))
 *     return estimated_size
 */
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1619
 *     estimated_size += (
 *         self._key_coder_impl.estimate_size(value.key, nested=True))
 *     return estimated_size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_estimated_size);
  __pyx_r = __pyx_v_estimated_size;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1612
 *     return ShardedKey(key=key, shard_id=shard_id)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     estimated_size = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.ShardedKeyCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_estimated_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1632
 *     encoded window using it's own coder.
 *   """
 *   def __init__(self, window_coder_impl: CoderImpl) -> None:             # <<<<<<<<<<<<<<
 *     self._window_coder_impl = window_coder_impl
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_window_coder_impl = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_window_coder_impl,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_window_coder_impl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1632, __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, 1632, __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_window_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)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, 1632, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_window_coder_impl), __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl, 1, "window_coder_impl", 0))) __PYX_ERR(0, 1632, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl___init__(__pyx_self, __pyx_v_self, __pyx_v_window_coder_impl);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_window_coder_impl) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1633
 *   """
 *   def __init__(self, window_coder_impl: CoderImpl) -> None:
 *     self._window_coder_impl = window_coder_impl             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, stream, nested):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_window_coder_impl_2, ((PyObject *)__pyx_v_window_coder_impl)) < 0) __PYX_ERR(0, 1633, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1632
 *     encoded window using it's own coder.
 *   """
 *   def __init__(self, window_coder_impl: CoderImpl) -> None:             # <<<<<<<<<<<<<<
 *     self._window_coder_impl = window_coder_impl
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1635
 *     self._window_coder_impl = window_coder_impl
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested)
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_stream,&__pyx_n_s_nested,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_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 1); __PYX_ERR(0, 1635, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 2); __PYX_ERR(0, 1635, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, 3); __PYX_ERR(0, 1635, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1635, __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_self = values[0];
    __pyx_v_value = values[1];
    __pyx_v_stream = values[2];
    __pyx_v_nested = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1635, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_2encode_to_stream(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_2encode_to_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_stream, PyObject *__pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);

  /* "apache_beam/coders/coder_impl.py":1636
 * 
 *   def encode_to_stream(self, value, stream, nested):
 *     TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested)             # <<<<<<<<<<<<<<
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_max_timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_v_stream) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_stream, __pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 1636, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nested); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1636, __pyx_L1_error)
  __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1), __pyx_t_2, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream), __pyx_t_5, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":1637
 *   def encode_to_stream(self, value, stream, nested):
 *     TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested)
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, stream, nested):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_window_coder_impl_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_value, __pyx_v_stream, __pyx_v_nested};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1637, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_value, __pyx_v_stream, __pyx_v_nested};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1637, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1637, __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_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_value);
    __Pyx_INCREF(__pyx_v_stream);
    __Pyx_GIVEREF(__pyx_v_stream);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_stream);
    __Pyx_INCREF(__pyx_v_nested);
    __Pyx_GIVEREF(__pyx_v_nested);
    PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_v_nested);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":1635
 *     self._window_coder_impl = window_coder_impl
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested)
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1639
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     TimestampCoderImpl().decode_from_stream(stream, nested)
 *     return self._window_coder_impl.decode_from_stream(stream, nested)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stream = 0;
  PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stream,&__pyx_n_s_nested,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_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, 1); __PYX_ERR(0, 1639, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, 2); __PYX_ERR(0, 1639, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1639, __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_stream = values[1];
    __pyx_v_nested = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1639, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_4decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_4decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stream, PyObject *__pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);

  /* "apache_beam/coders/coder_impl.py":1640
 * 
 *   def decode_from_stream(self, stream, nested):
 *     TimestampCoderImpl().decode_from_stream(stream, nested)             # <<<<<<<<<<<<<<
 *     return self._window_coder_impl.decode_from_stream(stream, nested)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_v_stream) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_stream, __pyx_ptype_11apache_beam_6coders_6stream_InputStream))))) __PYX_ERR(0, 1640, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_nested); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1640, __pyx_L1_error)
  __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1), ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)__pyx_v_stream), __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":1641
 *   def decode_from_stream(self, stream, nested):
 *     TimestampCoderImpl().decode_from_stream(stream, nested)
 *     return self._window_coder_impl.decode_from_stream(stream, nested)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value: Any, nested: bool = False) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_window_coder_impl_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_stream, __pyx_v_nested};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __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_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_stream, __pyx_v_nested};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_v_stream);
    __Pyx_GIVEREF(__pyx_v_stream);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_stream);
    __Pyx_INCREF(__pyx_v_nested);
    __Pyx_GIVEREF(__pyx_v_nested);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_nested);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1639
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     TimestampCoderImpl().decode_from_stream(stream, nested)
 *     return self._window_coder_impl.decode_from_stream(stream, nested)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1643
 *     return self._window_coder_impl.decode_from_stream(stream, nested)
 * 
 *   def estimate_size(self, value: Any, nested: bool = False) -> int:             # <<<<<<<<<<<<<<
 *     estimated_size = 0
 *     estimated_size += TimestampCoderImpl().estimate_size(value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_nested = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("estimate_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_nested,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, 1); __PYX_ERR(0, 1643, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "estimate_size") < 0)) __PYX_ERR(0, 1643, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
    __pyx_v_nested = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("estimate_size", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1643, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_6estimate_size(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_nested) {
  PyObject *__pyx_v_estimated_size = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("estimate_size", 0);

  /* "apache_beam/coders/coder_impl.py":1644
 * 
 *   def estimate_size(self, value: Any, nested: bool = False) -> int:
 *     estimated_size = 0             # <<<<<<<<<<<<<<
 *     estimated_size += TimestampCoderImpl().estimate_size(value)
 *     estimated_size += self._window_coder_impl.estimate_size(value, nested)
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_estimated_size = __pyx_int_0;

  /* "apache_beam/coders/coder_impl.py":1645
 *   def estimate_size(self, value: Any, nested: bool = False) -> int:
 *     estimated_size = 0
 *     estimated_size += TimestampCoderImpl().estimate_size(value)             # <<<<<<<<<<<<<<
 *     estimated_size += self._window_coder_impl.estimate_size(value, nested)
 *     return estimated_size
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_t_1)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1), __pyx_v_value, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1646
 *     estimated_size = 0
 *     estimated_size += TimestampCoderImpl().estimate_size(value)
 *     estimated_size += self._window_coder_impl.estimate_size(value, nested)             # <<<<<<<<<<<<<<
 *     return estimated_size
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_window_coder_impl_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_value, __pyx_v_nested};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1646, __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_v_value, __pyx_v_nested};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1646, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1646, __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_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_value);
    __Pyx_INCREF(__pyx_v_nested);
    __Pyx_GIVEREF(__pyx_v_nested);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_nested);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1646, __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_t_3 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_estimated_size, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":1647
 *     estimated_size += TimestampCoderImpl().estimate_size(value)
 *     estimated_size += self._window_coder_impl.estimate_size(value, nested)
 *     return estimated_size             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_estimated_size);
  __pyx_r = __pyx_v_estimated_size;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1643
 *     return self._window_coder_impl.decode_from_stream(stream, nested)
 * 
 *   def estimate_size(self, value: Any, nested: bool = False) -> int:             # <<<<<<<<<<<<<<
 *     estimated_size = 0
 *     estimated_size += TimestampCoderImpl().estimate_size(value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.TimestampPrefixingWindowCoderImpl.estimate_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_estimated_size);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1657
 * 
 *   @classmethod
 *   def register(cls, field_type, coder_impl):             # <<<<<<<<<<<<<<
 *     cls.ROW_ENCODERS[field_type, coder_impl] = cls
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register = {"register", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_field_type = 0;
  PyObject *__pyx_v_coder_impl = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("register (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field_type,&__pyx_n_s_coder_impl,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_field_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_coder_impl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, 1); __PYX_ERR(0, 1657, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register") < 0)) __PYX_ERR(0, 1657, __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_field_type = values[0];
    __pyx_v_coder_impl = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("register", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1657, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_register(((PyTypeObject*)__pyx_v_cls), __pyx_v_field_type, __pyx_v_coder_impl);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_register(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_field_type, PyObject *__pyx_v_coder_impl) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("register", 0);

  /* "apache_beam/coders/coder_impl.py":1658
 *   @classmethod
 *   def register(cls, field_type, coder_impl):
 *     cls.ROW_ENCODERS[field_type, coder_impl] = cls             # <<<<<<<<<<<<<<
 * 
 *   @classmethod
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_ROW_ENCODERS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_field_type);
  __Pyx_GIVEREF(__pyx_v_field_type);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_field_type);
  __Pyx_INCREF(__pyx_v_coder_impl);
  __Pyx_GIVEREF(__pyx_v_coder_impl);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_coder_impl);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_2, ((PyObject *)__pyx_v_cls)) < 0)) __PYX_ERR(0, 1658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1657
 * 
 *   @classmethod
 *   def register(cls, field_type, coder_impl):             # <<<<<<<<<<<<<<
 *     cls.ROW_ENCODERS[field_type, coder_impl] = cls
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1661
 * 
 *   @classmethod
 *   def create(cls, field_type, coder_impl, column):             # <<<<<<<<<<<<<<
 *     global row_coders_registered
 *     if not row_coders_registered:
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create = {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_field_type = 0;
  PyObject *__pyx_v_coder_impl = 0;
  PyObject *__pyx_v_column = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field_type,&__pyx_n_s_coder_impl,&__pyx_n_s_column,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_field_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_coder_impl)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 3, 3, 1); __PYX_ERR(0, 1661, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_column)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create", 1, 3, 3, 2); __PYX_ERR(0, 1661, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 1661, __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_field_type = values[0];
    __pyx_v_coder_impl = values[1];
    __pyx_v_column = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1661, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_2create(((PyTypeObject*)__pyx_v_cls), __pyx_v_field_type, __pyx_v_coder_impl, __pyx_v_column);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_2create(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_field_type, PyObject *__pyx_v_coder_impl, PyObject *__pyx_v_column) {
  CYTHON_UNUSED PyObject *__pyx_v_coder_impl_row_encoders = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create", 0);

  /* "apache_beam/coders/coder_impl.py":1663
 *   def create(cls, field_type, coder_impl, column):
 *     global row_coders_registered
 *     if not row_coders_registered:             # <<<<<<<<<<<<<<
 *       try:
 *         # pylint: disable=unused-import
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_row_coders_registered); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __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, 1663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "apache_beam/coders/coder_impl.py":1664
 *     global row_coders_registered
 *     if not row_coders_registered:
 *       try:             # <<<<<<<<<<<<<<
 *         # pylint: disable=unused-import
 *         from apache_beam.coders import coder_impl_row_encoders
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      /*try:*/ {

        /* "apache_beam/coders/coder_impl.py":1666
 *       try:
 *         # pylint: disable=unused-import
 *         from apache_beam.coders import coder_impl_row_encoders             # <<<<<<<<<<<<<<
 *       except ImportError:
 *         pass
 */
        __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_n_s_coder_impl_row_encoders);
        __Pyx_GIVEREF(__pyx_n_s_coder_impl_row_encoders);
        PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_coder_impl_row_encoders);
        __pyx_t_7 = __Pyx_Import(__pyx_n_s_apache_beam_coders, __pyx_t_1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1666, __pyx_L4_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_coder_impl_row_encoders); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_v_coder_impl_row_encoders = __pyx_t_1;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "apache_beam/coders/coder_impl.py":1664
 *     global row_coders_registered
 *     if not row_coders_registered:
 *       try:             # <<<<<<<<<<<<<<
 *         # pylint: disable=unused-import
 *         from apache_beam.coders import coder_impl_row_encoders
 */
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":1667
 *         # pylint: disable=unused-import
 *         from apache_beam.coders import coder_impl_row_encoders
 *       except ImportError:             # <<<<<<<<<<<<<<
 *         pass
 *       row_coders_registered = True
 */
      __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
      if (__pyx_t_8) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "apache_beam/coders/coder_impl.py":1664
 *     global row_coders_registered
 *     if not row_coders_registered:
 *       try:             # <<<<<<<<<<<<<<
 *         # pylint: disable=unused-import
 *         from apache_beam.coders import coder_impl_row_encoders
 */
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      __pyx_L9_try_end:;
    }

    /* "apache_beam/coders/coder_impl.py":1669
 *       except ImportError:
 *         pass
 *       row_coders_registered = True             # <<<<<<<<<<<<<<
 *     return cls.ROW_ENCODERS.get((field_type, column.dtype),
 *                                 GenericRowColumnEncoder)(coder_impl, column)
 */
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_row_coders_registered, Py_True) < 0) __PYX_ERR(0, 1669, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":1663
 *   def create(cls, field_type, coder_impl, column):
 *     global row_coders_registered
 *     if not row_coders_registered:             # <<<<<<<<<<<<<<
 *       try:
 *         # pylint: disable=unused-import
 */
  }

  /* "apache_beam/coders/coder_impl.py":1670
 *         pass
 *       row_coders_registered = True
 *     return cls.ROW_ENCODERS.get((field_type, column.dtype),             # <<<<<<<<<<<<<<
 *                                 GenericRowColumnEncoder)(coder_impl, column)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":1671
 *       row_coders_registered = True
 *     return cls.ROW_ENCODERS.get((field_type, column.dtype),
 *                                 GenericRowColumnEncoder)(coder_impl, column)             # <<<<<<<<<<<<<<
 * 
 *   def null_flags(self):
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_n_s_ROW_ENCODERS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "apache_beam/coders/coder_impl.py":1670
 *         pass
 *       row_coders_registered = True
 *     return cls.ROW_ENCODERS.get((field_type, column.dtype),             # <<<<<<<<<<<<<<
 *                                 GenericRowColumnEncoder)(coder_impl, column)
 * 
 */
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_column, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(__pyx_v_field_type);
  __Pyx_GIVEREF(__pyx_v_field_type);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_field_type);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9);
  __pyx_t_9 = 0;

  /* "apache_beam/coders/coder_impl.py":1671
 *       row_coders_registered = True
 *     return cls.ROW_ENCODERS.get((field_type, column.dtype),
 *                                 GenericRowColumnEncoder)(coder_impl, column)             # <<<<<<<<<<<<<<
 * 
 *   def null_flags(self):
 */
  __pyx_t_9 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_11, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder)};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_11, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder)};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_12 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_8, __pyx_t_11);
    __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder));
    __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder));
    PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_8, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder));
    __pyx_t_11 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_coder_impl, __pyx_v_column};
    __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_coder_impl, __pyx_v_column};
    __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else
  #endif
  {
    __pyx_t_12 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    if (__pyx_t_10) {
      __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
    }
    __Pyx_INCREF(__pyx_v_coder_impl);
    __Pyx_GIVEREF(__pyx_v_coder_impl);
    PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_8, __pyx_v_coder_impl);
    __Pyx_INCREF(__pyx_v_column);
    __Pyx_GIVEREF(__pyx_v_column);
    PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_8, __pyx_v_column);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1661
 * 
 *   @classmethod
 *   def create(cls, field_type, coder_impl, column):             # <<<<<<<<<<<<<<
 *     global row_coders_registered
 *     if not row_coders_registered:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_coder_impl_row_encoders);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1673
 *                                 GenericRowColumnEncoder)(coder_impl, column)
 * 
 *   def null_flags(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags = {"null_flags", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("null_flags (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_4null_flags(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_4null_flags(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("null_flags", 0);

  /* "apache_beam/coders/coder_impl.py":1674
 * 
 *   def null_flags(self):
 *     raise NotImplementedError(type(self))             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, index, out):
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1674, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1673
 *                                 GenericRowColumnEncoder)(coder_impl, column)
 * 
 *   def null_flags(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.null_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1676
 *     raise NotImplementedError(type(self))
 * 
 *   def encode_to_stream(self, index, out):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */

static int __pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED size_t __pyx_v_index, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);

  /* "apache_beam/coders/coder_impl.py":1677
 * 
 *   def encode_to_stream(self, index, out):
 *     raise NotImplementedError(type(self))             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, index, in_stream):
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1677, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1676
 *     raise NotImplementedError(type(self))
 * 
 *   def encode_to_stream(self, index, out):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1679
 *     raise NotImplementedError(type(self))
 * 
 *   def decode_from_stream(self, index, in_stream):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */

static int __pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, CYTHON_UNUSED size_t __pyx_v_index, CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);

  /* "apache_beam/coders/coder_impl.py":1680
 * 
 *   def decode_from_stream(self, index, in_stream):
 *     raise NotImplementedError(type(self))             # <<<<<<<<<<<<<<
 * 
 *   def finalize_write(self):
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1680, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1679
 *     raise NotImplementedError(type(self))
 * 
 *   def decode_from_stream(self, index, in_stream):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1682
 *     raise NotImplementedError(type(self))
 * 
 *   def finalize_write(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write = {"finalize_write", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finalize_write (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_6finalize_write(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_6finalize_write(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("finalize_write", 0);

  /* "apache_beam/coders/coder_impl.py":1683
 * 
 *   def finalize_write(self):
 *     raise NotImplementedError(type(self))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 1683, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1682
 *     raise NotImplementedError(type(self))
 * 
 *   def finalize_write(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.finalize_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_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_6coders_10coder_impl_16RowColumnEncoder_8__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_RowColumnEncoder); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_RowColumnEncoder); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_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_6coders_10coder_impl_16RowColumnEncoder_10__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1687
 * 
 * class GenericRowColumnEncoder(RowColumnEncoder):
 *   def __init__(self, coder_impl, column):             # <<<<<<<<<<<<<<
 *     self.coder_impl = coder_impl
 *     self.column = column
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_coder_impl = 0;
  PyObject *__pyx_v_column = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coder_impl,&__pyx_n_s_column,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_coder_impl)) != 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_column)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1687, __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, 1687, __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_coder_impl = values[0];
    __pyx_v_column = 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, 1687, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self), __pyx_v_coder_impl, __pyx_v_column);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v_coder_impl, PyObject *__pyx_v_column) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1688
 * class GenericRowColumnEncoder(RowColumnEncoder):
 *   def __init__(self, coder_impl, column):
 *     self.coder_impl = coder_impl             # <<<<<<<<<<<<<<
 *     self.column = column
 * 
 */
  if (!(likely(((__pyx_v_coder_impl) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_coder_impl, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1688, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_coder_impl;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->coder_impl);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->coder_impl));
  __pyx_v_self->coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1689
 *   def __init__(self, coder_impl, column):
 *     self.coder_impl = coder_impl
 *     self.column = column             # <<<<<<<<<<<<<<
 * 
 *   def null_flags(self):
 */
  __Pyx_INCREF(__pyx_v_column);
  __Pyx_GIVEREF(__pyx_v_column);
  __Pyx_GOTREF(__pyx_v_self->column);
  __Pyx_DECREF(__pyx_v_self->column);
  __pyx_v_self->column = __pyx_v_column;

  /* "apache_beam/coders/coder_impl.py":1687
 * 
 * class GenericRowColumnEncoder(RowColumnEncoder):
 *   def __init__(self, coder_impl, column):             # <<<<<<<<<<<<<<
 *     self.coder_impl = coder_impl
 *     self.column = column
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1691
 *     self.column = column
 * 
 *   def null_flags(self):             # <<<<<<<<<<<<<<
 *     # pylint: disable=singleton-comparison
 *     return self.column == None  # This is an array.
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags = {"null_flags", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("null_flags (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_2null_flags(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_2null_flags(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("null_flags", 0);

  /* "apache_beam/coders/coder_impl.py":1693
 *   def null_flags(self):
 *     # pylint: disable=singleton-comparison
 *     return self.column == None  # This is an array.             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, index, out):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->column, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1691
 *     self.column = column
 * 
 *   def null_flags(self):             # <<<<<<<<<<<<<<
 *     # pylint: disable=singleton-comparison
 *     return self.column == None  # This is an array.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.null_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1695
 *     return self.column == None  # This is an array.
 * 
 *   def encode_to_stream(self, index, out):             # <<<<<<<<<<<<<<
 *     self.coder_impl.encode_to_stream(self.column[index], out, True)
 * 
 */

static int __pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);

  /* "apache_beam/coders/coder_impl.py":1696
 * 
 *   def encode_to_stream(self, index, out):
 *     self.coder_impl.encode_to_stream(self.column[index], out, True)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, index, in_stream):
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->column, __pyx_v_index, size_t, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->coder_impl, __pyx_t_1, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1695
 *     return self.column == None  # This is an array.
 * 
 *   def encode_to_stream(self, index, out):             # <<<<<<<<<<<<<<
 *     self.coder_impl.encode_to_stream(self.column[index], out, True)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1698
 *     self.coder_impl.encode_to_stream(self.column[index], out, True)
 * 
 *   def decode_from_stream(self, index, in_stream):             # <<<<<<<<<<<<<<
 *     self.column[index] = self.coder_impl.decode_from_stream(in_stream, True)
 * 
 */

static int __pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, size_t __pyx_v_index, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);

  /* "apache_beam/coders/coder_impl.py":1699
 * 
 *   def decode_from_stream(self, index, in_stream):
 *     self.column[index] = self.coder_impl.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 * 
 *   def finalize_write(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->coder_impl->__pyx_vtab)->decode_from_stream(__pyx_v_self->coder_impl, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(__Pyx_SetItemInt(__pyx_v_self->column, __pyx_v_index, __pyx_t_1, size_t, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 1699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1698
 *     self.coder_impl.encode_to_stream(self.column[index], out, True)
 * 
 *   def decode_from_stream(self, index, in_stream):             # <<<<<<<<<<<<<<
 *     self.column[index] = self.coder_impl.decode_from_stream(in_stream, True)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1701
 *     self.column[index] = self.coder_impl.decode_from_stream(in_stream, True)
 * 
 *   def finalize_write(self):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write = {"finalize_write", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finalize_write (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_4finalize_write(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_4finalize_write(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finalize_write", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_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_6coders_10coder_impl_23GenericRowColumnEncoder_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.coder_impl, self.column)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->coder_impl));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->coder_impl));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->coder_impl));
  __Pyx_INCREF(__pyx_v_self->column);
  __Pyx_GIVEREF(__pyx_v_self->column);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->column);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.coder_impl, self.column)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.coder_impl, self.column)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.coder_impl is not None or self.column is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.coder_impl, self.column)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.coder_impl is not None or self.column is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->coder_impl) != 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->column != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.coder_impl is not None or self.column is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.coder_impl is not None or self.column is not None
 *     if use_setstate:
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_GenericRowColumnE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_256189473);
    __Pyx_GIVEREF(__pyx_int_256189473);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_256189473);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.coder_impl is not None or self.column is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, None), state
 *     else:
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_GenericRowColumnE); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_256189473);
    __Pyx_GIVEREF(__pyx_int_256189473);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_256189473);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_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_6coders_10coder_impl_23GenericRowColumnEncoder_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.GenericRowColumnEncoder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1707
 * class RowCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema, components):             # <<<<<<<<<<<<<<
 *     self.schema = schema
 *     self.num_fields = len(self.schema.fields)
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_components = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_schema,&__pyx_n_s_components,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_schema)) != 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_components)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1707, __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, 1707, __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_schema = values[0];
    __pyx_v_components = 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, 1707, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_schema, __pyx_v_components);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/coders/coder_impl.py":1717
 *       # should never be duplicate encoding positions.
 *       enc_posx = list(
 *           set(field.encoding_position for field in self.schema.fields))             # <<<<<<<<<<<<<<
 *       if len(enc_posx) != len(self.schema.fields):
 *         raise ValueError(
 */

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr(__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1717, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1717, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __pyx_r = PySet_New(NULL); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1717, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1717, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1717, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1717, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1717, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_field, __pyx_n_s_encoding_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PySet_Add(__pyx_r, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1717, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/coders/coder_impl.py":1723
 *             but not all fields have encoding_position set''')
 *       self.encoding_positions = list(
 *           field.encoding_position for field in self.schema.fields)             # <<<<<<<<<<<<<<
 *     self.encoding_positions_argsort = list(np.argsort(self.encoding_positions))
 *     self.encoding_positions_are_trivial = self.encoding_positions == list(
 */

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1723, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1723, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1723, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1723, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1723, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1723, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1723, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_field, __pyx_n_s_encoding_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1723, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/coders/coder_impl.py":1728
 *         range(len(self.encoding_positions)))
 *     self.components = list(
 *         components[self.encoding_positions.index(i)].get_impl()             # <<<<<<<<<<<<<<
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 */

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___6genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1728, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1728, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":1729
 *     self.components = list(
 *         components[self.encoding_positions.index(i)].get_impl()
 *         for i in self.encoding_positions)             # <<<<<<<<<<<<<<
 *     self.has_nullable_fields = any(
 *         field.type.nullable for field in self.schema.fields)
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1729, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->encoding_positions == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 1729, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->encoding_positions; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1729, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":1728
 *         range(len(self.encoding_positions)))
 *     self.components = list(
 *         components[self.encoding_positions.index(i)].get_impl()             # <<<<<<<<<<<<<<
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_components)) { __Pyx_RaiseClosureNameError("components"); __PYX_ERR(0, 1728, __pyx_L1_error) }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1728, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->encoding_positions, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_cur_scope->__pyx_v_i) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_i);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_components, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1728, __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_get_impl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1728, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":1729
 *     self.components = list(
 *         components[self.encoding_positions.index(i)].get_impl()
 *         for i in self.encoding_positions)             # <<<<<<<<<<<<<<
 *     self.has_nullable_fields = any(
 *         field.type.nullable for field in self.schema.fields)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "apache_beam/coders/coder_impl.py":1728
 *         range(len(self.encoding_positions)))
 *     self.components = list(
 *         components[self.encoding_positions.index(i)].get_impl()             # <<<<<<<<<<<<<<
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "apache_beam/coders/coder_impl.py":1731
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 *         field.type.nullable for field in self.schema.fields)             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___9genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1731, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_apache_beam_coders_coder_impl); if (unlikely(!gen)) __PYX_ERR(0, 1731, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1731, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1731, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1731, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1731, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1731, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1731, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_field, __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nullable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1731, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "apache_beam/coders/coder_impl.py":1730
 *         components[self.encoding_positions.index(i)].get_impl()
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(             # <<<<<<<<<<<<<<
 *         field.type.nullable for field in self.schema.fields)
 * 
 */
      __Pyx_XDECREF(__pyx_r);

      /* "apache_beam/coders/coder_impl.py":1731
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 *         field.type.nullable for field in self.schema.fields)             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {

    /* "apache_beam/coders/coder_impl.py":1730
 *         components[self.encoding_positions.index(i)].get_impl()
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(             # <<<<<<<<<<<<<<
 *         field.type.nullable for field in self.schema.fields)
 * 
 */
    __Pyx_XDECREF(__pyx_r);

    /* "apache_beam/coders/coder_impl.py":1731
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 *         field.type.nullable for field in self.schema.fields)             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1707
 * class RowCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema, components):             # <<<<<<<<<<<<<<
 *     self.schema = schema
 *     self.num_fields = len(self.schema.fields)
 */

static int __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_components) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *__pyx_cur_scope;
  PyObject *__pyx_v_enc_posx = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_f = NULL;
  PyObject *__pyx_8genexpr7__pyx_v_field = NULL;
  PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator2 = 0;
  PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator3 = 0;
  PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator4 = 0;
  PyObject *__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator5 = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __pyx_cur_scope = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *)__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__(__pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1707, __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_components = __pyx_v_components;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_components);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_components);

  /* "apache_beam/coders/coder_impl.py":1708
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema, components):
 *     self.schema = schema             # <<<<<<<<<<<<<<
 *     self.num_fields = len(self.schema.fields)
 *     self.field_names = [f.name for f in self.schema.fields]
 */
  __Pyx_INCREF(__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_v_schema);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->schema);
  __pyx_cur_scope->__pyx_v_self->schema = __pyx_v_schema;

  /* "apache_beam/coders/coder_impl.py":1709
 *   def __init__(self, schema, components):
 *     self.schema = schema
 *     self.num_fields = len(self.schema.fields)             # <<<<<<<<<<<<<<
 *     self.field_names = [f.name for f in self.schema.fields]
 *     self.field_nullable = [field.type.nullable for field in self.schema.fields]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_cur_scope->__pyx_v_self->num_fields = __pyx_t_2;

  /* "apache_beam/coders/coder_impl.py":1710
 *     self.schema = schema
 *     self.num_fields = len(self.schema.fields)
 *     self.field_names = [f.name for f in self.schema.fields]             # <<<<<<<<<<<<<<
 *     self.field_nullable = [field.type.nullable for field in self.schema.fields]
 *     self.constructor = named_tuple_from_schema(schema)
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1710, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1710, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1710, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1710, __pyx_L5_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1710, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1710, __pyx_L5_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1710, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_5(__pyx_t_4);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1710, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_f, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr6__pyx_v_f, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1710, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1710, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_f); __pyx_8genexpr6__pyx_v_f = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_f); __pyx_8genexpr6__pyx_v_f = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->field_names);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->field_names);
  __pyx_cur_scope->__pyx_v_self->field_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1711
 *     self.num_fields = len(self.schema.fields)
 *     self.field_names = [f.name for f in self.schema.fields]
 *     self.field_nullable = [field.type.nullable for field in self.schema.fields]             # <<<<<<<<<<<<<<
 *     self.constructor = named_tuple_from_schema(schema)
 *     self.encoding_positions = list(range(len(self.schema.fields)))
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1711, __pyx_L11_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L11_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1711, __pyx_L11_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1711, __pyx_L11_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1711, __pyx_L11_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_5(__pyx_t_3);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1711, __pyx_L11_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_field, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr7__pyx_v_field, __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nullable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1711, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1711, __pyx_L11_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_field); __pyx_8genexpr7__pyx_v_field = 0;
    goto __pyx_L14_exit_scope;
    __pyx_L11_error:;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_field); __pyx_8genexpr7__pyx_v_field = 0;
    goto __pyx_L1_error;
    __pyx_L14_exit_scope:;
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->field_nullable);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->field_nullable);
  __pyx_cur_scope->__pyx_v_self->field_nullable = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1712
 *     self.field_names = [f.name for f in self.schema.fields]
 *     self.field_nullable = [field.type.nullable for field in self.schema.fields]
 *     self.constructor = named_tuple_from_schema(schema)             # <<<<<<<<<<<<<<
 *     self.encoding_positions = list(range(len(self.schema.fields)))
 *     if self.schema.encoding_positions_set:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_named_tuple_from_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->constructor);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->constructor);
  __pyx_cur_scope->__pyx_v_self->constructor = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1713
 *     self.field_nullable = [field.type.nullable for field in self.schema.fields]
 *     self.constructor = named_tuple_from_schema(schema)
 *     self.encoding_positions = list(range(len(self.schema.fields)))             # <<<<<<<<<<<<<<
 *     if self.schema.encoding_positions_set:
 *       # should never be duplicate encoding positions.
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->encoding_positions);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->encoding_positions);
  __pyx_cur_scope->__pyx_v_self->encoding_positions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1714
 *     self.constructor = named_tuple_from_schema(schema)
 *     self.encoding_positions = list(range(len(self.schema.fields)))
 *     if self.schema.encoding_positions_set:             # <<<<<<<<<<<<<<
 *       # should never be duplicate encoding positions.
 *       enc_posx = list(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_n_s_encoding_positions_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_7) {

    /* "apache_beam/coders/coder_impl.py":1717
 *       # should never be duplicate encoding positions.
 *       enc_posx = list(
 *           set(field.encoding_position for field in self.schema.fields))             # <<<<<<<<<<<<<<
 *       if len(enc_posx) != len(self.schema.fields):
 *         raise ValueError(
 */
    __pyx_t_1 = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1716
 *     if self.schema.encoding_positions_set:
 *       # should never be duplicate encoding positions.
 *       enc_posx = list(             # <<<<<<<<<<<<<<
 *           set(field.encoding_position for field in self.schema.fields))
 *       if len(enc_posx) != len(self.schema.fields):
 */
    __pyx_t_1 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_enc_posx = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1718
 *       enc_posx = list(
 *           set(field.encoding_position for field in self.schema.fields))
 *       if len(enc_posx) != len(self.schema.fields):             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f'''Schema with id {schema.id} has encoding_positions_set=True,
 */
    __pyx_t_2 = PyList_GET_SIZE(__pyx_v_enc_posx); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1718, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1718, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = ((__pyx_t_2 != __pyx_t_8) != 0);
    if (unlikely(__pyx_t_7)) {

      /* "apache_beam/coders/coder_impl.py":1720
 *       if len(enc_posx) != len(self.schema.fields):
 *         raise ValueError(
 *             f'''Schema with id {schema.id} has encoding_positions_set=True,             # <<<<<<<<<<<<<<
 *             but not all fields have encoding_position set''')
 *       self.encoding_positions = list(
 */
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = 0;
      __pyx_t_9 = 127;
      __Pyx_INCREF(__pyx_kp_u_Schema_with_id);
      __pyx_t_8 += 15;
      __Pyx_GIVEREF(__pyx_kp_u_Schema_with_id);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Schema_with_id);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_has_encoding_positions_set_True);
      __pyx_t_8 += 91;
      __Pyx_GIVEREF(__pyx_kp_u_has_encoding_positions_set_True);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_has_encoding_positions_set_True);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1719
 *           set(field.encoding_position for field in self.schema.fields))
 *       if len(enc_posx) != len(self.schema.fields):
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             f'''Schema with id {schema.id} has encoding_positions_set=True,
 *             but not all fields have encoding_position set''')
 */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1719, __pyx_L1_error)

      /* "apache_beam/coders/coder_impl.py":1718
 *       enc_posx = list(
 *           set(field.encoding_position for field in self.schema.fields))
 *       if len(enc_posx) != len(self.schema.fields):             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             f'''Schema with id {schema.id} has encoding_positions_set=True,
 */
    }

    /* "apache_beam/coders/coder_impl.py":1723
 *             but not all fields have encoding_position set''')
 *       self.encoding_positions = list(
 *           field.encoding_position for field in self.schema.fields)             # <<<<<<<<<<<<<<
 *     self.encoding_positions_argsort = list(np.argsort(self.encoding_positions))
 *     self.encoding_positions_are_trivial = self.encoding_positions == list(
 */
    __pyx_t_1 = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/coders/coder_impl.py":1722
 *             f'''Schema with id {schema.id} has encoding_positions_set=True,
 *             but not all fields have encoding_position set''')
 *       self.encoding_positions = list(             # <<<<<<<<<<<<<<
 *           field.encoding_position for field in self.schema.fields)
 *     self.encoding_positions_argsort = list(np.argsort(self.encoding_positions))
 */
    __pyx_t_6 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->encoding_positions);
    __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->encoding_positions);
    __pyx_cur_scope->__pyx_v_self->encoding_positions = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "apache_beam/coders/coder_impl.py":1714
 *     self.constructor = named_tuple_from_schema(schema)
 *     self.encoding_positions = list(range(len(self.schema.fields)))
 *     if self.schema.encoding_positions_set:             # <<<<<<<<<<<<<<
 *       # should never be duplicate encoding positions.
 *       enc_posx = list(
 */
  }

  /* "apache_beam/coders/coder_impl.py":1724
 *       self.encoding_positions = list(
 *           field.encoding_position for field in self.schema.fields)
 *     self.encoding_positions_argsort = list(np.argsort(self.encoding_positions))             # <<<<<<<<<<<<<<
 *     self.encoding_positions_are_trivial = self.encoding_positions == list(
 *         range(len(self.encoding_positions)))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_argsort); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_cur_scope->__pyx_v_self->encoding_positions) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_self->encoding_positions);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PySequence_List(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->encoding_positions_argsort);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->encoding_positions_argsort);
  __pyx_cur_scope->__pyx_v_self->encoding_positions_argsort = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":1726
 *     self.encoding_positions_argsort = list(np.argsort(self.encoding_positions))
 *     self.encoding_positions_are_trivial = self.encoding_positions == list(
 *         range(len(self.encoding_positions)))             # <<<<<<<<<<<<<<
 *     self.components = list(
 *         components[self.encoding_positions.index(i)].get_impl()
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_self->encoding_positions;
  __Pyx_INCREF(__pyx_t_3);
  if (unlikely(__pyx_t_3 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1726, __pyx_L1_error)
  }
  __pyx_t_8 = PyList_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1726, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":1725
 *           field.encoding_position for field in self.schema.fields)
 *     self.encoding_positions_argsort = list(np.argsort(self.encoding_positions))
 *     self.encoding_positions_are_trivial = self.encoding_positions == list(             # <<<<<<<<<<<<<<
 *         range(len(self.encoding_positions)))
 *     self.components = list(
 */
  __pyx_t_3 = PySequence_List(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_self->encoding_positions, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1725, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1725, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_cur_scope->__pyx_v_self->encoding_positions_are_trivial = __pyx_t_7;

  /* "apache_beam/coders/coder_impl.py":1728
 *         range(len(self.encoding_positions)))
 *     self.components = list(
 *         components[self.encoding_positions.index(i)].get_impl()             # <<<<<<<<<<<<<<
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 */
  __pyx_t_6 = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___6genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "apache_beam/coders/coder_impl.py":1727
 *     self.encoding_positions_are_trivial = self.encoding_positions == list(
 *         range(len(self.encoding_positions)))
 *     self.components = list(             # <<<<<<<<<<<<<<
 *         components[self.encoding_positions.index(i)].get_impl()
 *         for i in self.encoding_positions)
 */
  __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_self->components);
  __Pyx_DECREF(__pyx_cur_scope->__pyx_v_self->components);
  __pyx_cur_scope->__pyx_v_self->components = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":1731
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(
 *         field.type.nullable for field in self.schema.fields)             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __pyx_t_3 = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___9genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "apache_beam/coders/coder_impl.py":1730
 *         components[self.encoding_positions.index(i)].get_impl()
 *         for i in self.encoding_positions)
 *     self.has_nullable_fields = any(             # <<<<<<<<<<<<<<
 *         field.type.nullable for field in self.schema.fields)
 * 
 */
  __pyx_cur_scope->__pyx_v_self->has_nullable_fields = __pyx_t_7;

  /* "apache_beam/coders/coder_impl.py":1707
 * class RowCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema, components):             # <<<<<<<<<<<<<<
 *     self.schema = schema
 *     self.num_fields = len(self.schema.fields)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_enc_posx);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_f);
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_field);
  __Pyx_XDECREF(__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___2generator2);
  __Pyx_XDECREF(__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___5generator3);
  __Pyx_XDECREF(__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___8generator4);
  __Pyx_XDECREF(__pyx_gb_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8__init___11generator5);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1733
 *         field.type.nullable for field in self.schema.fields)
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_var_int64(self.num_fields)
 *     attrs = [getattr(value, name) for name in self.field_names]
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  int __pyx_v_i;
  int __pyx_v_running;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_component_coder = 0;
  PyObject *__pyx_v_attrs = NULL;
  int __pyx_v_any_nulls;
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_9genexpr12__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1733, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1733, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1733, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1733, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1733, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1734
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     out.write_var_int64(self.num_fields)             # <<<<<<<<<<<<<<
 *     attrs = [getattr(value, name) for name in self.field_names]
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_v_self->num_fields, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1735
 *   def encode_to_stream(self, value, out, nested):
 *     out.write_var_int64(self.num_fields)
 *     attrs = [getattr(value, name) for name in self.field_names]             # <<<<<<<<<<<<<<
 * 
 *     if self.has_nullable_fields:
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_self->field_names == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 1735, __pyx_L5_error)
    }
    __pyx_t_2 = __pyx_v_self->field_names; __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_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1735, __pyx_L5_error)
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1735, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_name, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetAttr(__pyx_v_value, __pyx_9genexpr12__pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1735, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1735, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_name); __pyx_9genexpr12__pyx_v_name = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_name); __pyx_9genexpr12__pyx_v_name = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_v_attrs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1737
 *     attrs = [getattr(value, name) for name in self.field_names]
 * 
 *     if self.has_nullable_fields:             # <<<<<<<<<<<<<<
 *       any_nulls = False
 *       for attr in attrs:
 */
  __pyx_t_9 = (__pyx_v_self->has_nullable_fields != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1738
 * 
 *     if self.has_nullable_fields:
 *       any_nulls = False             # <<<<<<<<<<<<<<
 *       for attr in attrs:
 *         if attr is None:
 */
    __pyx_v_any_nulls = 0;

    /* "apache_beam/coders/coder_impl.py":1739
 *     if self.has_nullable_fields:
 *       any_nulls = False
 *       for attr in attrs:             # <<<<<<<<<<<<<<
 *         if attr is None:
 *           any_nulls = True
 */
    __pyx_t_1 = __pyx_v_attrs; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
    for (;;) {
      if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1739, __pyx_L1_error)
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":1740
 *       any_nulls = False
 *       for attr in attrs:
 *         if attr is None:             # <<<<<<<<<<<<<<
 *           any_nulls = True
 *           break
 */
      __pyx_t_9 = (__pyx_v_attr == Py_None);
      __pyx_t_10 = (__pyx_t_9 != 0);
      if (__pyx_t_10) {

        /* "apache_beam/coders/coder_impl.py":1741
 *       for attr in attrs:
 *         if attr is None:
 *           any_nulls = True             # <<<<<<<<<<<<<<
 *           break
 *       if any_nulls:
 */
        __pyx_v_any_nulls = 1;

        /* "apache_beam/coders/coder_impl.py":1742
 *         if attr is None:
 *           any_nulls = True
 *           break             # <<<<<<<<<<<<<<
 *       if any_nulls:
 *         out.write_var_int64((self.num_fields + 7) // 8)
 */
        goto __pyx_L11_break;

        /* "apache_beam/coders/coder_impl.py":1740
 *       any_nulls = False
 *       for attr in attrs:
 *         if attr is None:             # <<<<<<<<<<<<<<
 *           any_nulls = True
 *           break
 */
      }

      /* "apache_beam/coders/coder_impl.py":1739
 *     if self.has_nullable_fields:
 *       any_nulls = False
 *       for attr in attrs:             # <<<<<<<<<<<<<<
 *         if attr is None:
 *           any_nulls = True
 */
    }
    __pyx_L11_break:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1743
 *           any_nulls = True
 *           break
 *       if any_nulls:             # <<<<<<<<<<<<<<
 *         out.write_var_int64((self.num_fields + 7) // 8)
 *         # Pack the bits, little-endian, in consecutive bytes.
 */
    __pyx_t_10 = (__pyx_v_any_nulls != 0);
    if (__pyx_t_10) {

      /* "apache_beam/coders/coder_impl.py":1744
 *           break
 *       if any_nulls:
 *         out.write_var_int64((self.num_fields + 7) // 8)             # <<<<<<<<<<<<<<
 *         # Pack the bits, little-endian, in consecutive bytes.
 *         running = 0
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __Pyx_div_long((__pyx_v_self->num_fields + 7), 8), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1746
 *         out.write_var_int64((self.num_fields + 7) // 8)
 *         # Pack the bits, little-endian, in consecutive bytes.
 *         running = 0             # <<<<<<<<<<<<<<
 *         for i, attr in enumerate(attrs):
 *           if i and i % 8 == 0:
 */
      __pyx_v_running = 0;

      /* "apache_beam/coders/coder_impl.py":1747
 *         # Pack the bits, little-endian, in consecutive bytes.
 *         running = 0
 *         for i, attr in enumerate(attrs):             # <<<<<<<<<<<<<<
 *           if i and i % 8 == 0:
 *             out.write_byte(running)
 */
      __pyx_t_6 = 0;
      __pyx_t_1 = __pyx_v_attrs; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
      for (;;) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1747, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_v_i = __pyx_t_6;
        __pyx_t_6 = (__pyx_t_6 + 1);

        /* "apache_beam/coders/coder_impl.py":1748
 *         running = 0
 *         for i, attr in enumerate(attrs):
 *           if i and i % 8 == 0:             # <<<<<<<<<<<<<<
 *             out.write_byte(running)
 *             running = 0
 */
        __pyx_t_9 = (__pyx_v_i != 0);
        if (__pyx_t_9) {
        } else {
          __pyx_t_10 = __pyx_t_9;
          goto __pyx_L17_bool_binop_done;
        }
        __pyx_t_9 = ((__Pyx_mod_long(__pyx_v_i, 8) == 0) != 0);
        __pyx_t_10 = __pyx_t_9;
        __pyx_L17_bool_binop_done:;
        if (__pyx_t_10) {

          /* "apache_beam/coders/coder_impl.py":1749
 *         for i, attr in enumerate(attrs):
 *           if i and i % 8 == 0:
 *             out.write_byte(running)             # <<<<<<<<<<<<<<
 *             running = 0
 *           running |= (attr is None) << (i % 8)
 */
          __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, __pyx_v_running, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/coders/coder_impl.py":1750
 *           if i and i % 8 == 0:
 *             out.write_byte(running)
 *             running = 0             # <<<<<<<<<<<<<<
 *           running |= (attr is None) << (i % 8)
 *         out.write_byte(running)
 */
          __pyx_v_running = 0;

          /* "apache_beam/coders/coder_impl.py":1748
 *         running = 0
 *         for i, attr in enumerate(attrs):
 *           if i and i % 8 == 0:             # <<<<<<<<<<<<<<
 *             out.write_byte(running)
 *             running = 0
 */
        }

        /* "apache_beam/coders/coder_impl.py":1751
 *             out.write_byte(running)
 *             running = 0
 *           running |= (attr is None) << (i % 8)             # <<<<<<<<<<<<<<
 *         out.write_byte(running)
 *       else:
 */
        __pyx_t_10 = (__pyx_v_attr == Py_None);
        __pyx_v_running = (__pyx_v_running | (__pyx_t_10 << __Pyx_mod_long(__pyx_v_i, 8)));

        /* "apache_beam/coders/coder_impl.py":1747
 *         # Pack the bits, little-endian, in consecutive bytes.
 *         running = 0
 *         for i, attr in enumerate(attrs):             # <<<<<<<<<<<<<<
 *           if i and i % 8 == 0:
 *             out.write_byte(running)
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1752
 *             running = 0
 *           running |= (attr is None) << (i % 8)
 *         out.write_byte(running)             # <<<<<<<<<<<<<<
 *       else:
 *         out.write_byte(0)
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, __pyx_v_running, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1752, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1743
 *           any_nulls = True
 *           break
 *       if any_nulls:             # <<<<<<<<<<<<<<
 *         out.write_var_int64((self.num_fields + 7) // 8)
 *         # Pack the bits, little-endian, in consecutive bytes.
 */
      goto __pyx_L13;
    }

    /* "apache_beam/coders/coder_impl.py":1754
 *         out.write_byte(running)
 *       else:
 *         out.write_byte(0)             # <<<<<<<<<<<<<<
 *     else:
 *       out.write_byte(0)
 */
    /*else*/ {
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_L13:;

    /* "apache_beam/coders/coder_impl.py":1737
 *     attrs = [getattr(value, name) for name in self.field_names]
 * 
 *     if self.has_nullable_fields:             # <<<<<<<<<<<<<<
 *       any_nulls = False
 *       for attr in attrs:
 */
    goto __pyx_L9;
  }

  /* "apache_beam/coders/coder_impl.py":1756
 *         out.write_byte(0)
 *     else:
 *       out.write_byte(0)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(self.num_fields):
 */
  /*else*/ {
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L9:;

  /* "apache_beam/coders/coder_impl.py":1758
 *       out.write_byte(0)
 * 
 *     for i in range(self.num_fields):             # <<<<<<<<<<<<<<
 *       if not self.encoding_positions_are_trivial:
 *         i = self.encoding_positions_argsort[i]
 */
  __pyx_t_6 = __pyx_v_self->num_fields;
  __pyx_t_11 = __pyx_t_6;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "apache_beam/coders/coder_impl.py":1759
 * 
 *     for i in range(self.num_fields):
 *       if not self.encoding_positions_are_trivial:             # <<<<<<<<<<<<<<
 *         i = self.encoding_positions_argsort[i]
 *       attr = attrs[i]
 */
    __pyx_t_10 = ((!(__pyx_v_self->encoding_positions_are_trivial != 0)) != 0);
    if (__pyx_t_10) {

      /* "apache_beam/coders/coder_impl.py":1760
 *     for i in range(self.num_fields):
 *       if not self.encoding_positions_are_trivial:
 *         i = self.encoding_positions_argsort[i]             # <<<<<<<<<<<<<<
 *       attr = attrs[i]
 *       if attr is None:
 */
      if (unlikely(__pyx_v_self->encoding_positions_argsort == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1760, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->encoding_positions_argsort, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1760, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_i = __pyx_t_13;

      /* "apache_beam/coders/coder_impl.py":1759
 * 
 *     for i in range(self.num_fields):
 *       if not self.encoding_positions_are_trivial:             # <<<<<<<<<<<<<<
 *         i = self.encoding_positions_argsort[i]
 *       attr = attrs[i]
 */
    }

    /* "apache_beam/coders/coder_impl.py":1761
 *       if not self.encoding_positions_are_trivial:
 *         i = self.encoding_positions_argsort[i]
 *       attr = attrs[i]             # <<<<<<<<<<<<<<
 *       if attr is None:
 *         if not self.field_nullable[i]:
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_attrs, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1762
 *         i = self.encoding_positions_argsort[i]
 *       attr = attrs[i]
 *       if attr is None:             # <<<<<<<<<<<<<<
 *         if not self.field_nullable[i]:
 *           raise ValueError(
 */
    __pyx_t_10 = (__pyx_v_attr == Py_None);
    __pyx_t_9 = (__pyx_t_10 != 0);
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":1763
 *       attr = attrs[i]
 *       if attr is None:
 *         if not self.field_nullable[i]:             # <<<<<<<<<<<<<<
 *           raise ValueError(
 *               "Attempted to encode null for non-nullable field \"{}\".".format(
 */
      if (unlikely(__pyx_v_self->field_nullable == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1763, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->field_nullable, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1763, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = ((!__pyx_t_9) != 0);
      if (unlikely(__pyx_t_10)) {

        /* "apache_beam/coders/coder_impl.py":1765
 *         if not self.field_nullable[i]:
 *           raise ValueError(
 *               "Attempted to encode null for non-nullable field \"{}\".".format(             # <<<<<<<<<<<<<<
 *                   self.schema.fields[i].name))
 *         continue
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Attempted_to_encode_null_for_non, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1765, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);

        /* "apache_beam/coders/coder_impl.py":1766
 *           raise ValueError(
 *               "Attempted to encode null for non-nullable field \"{}\".".format(
 *                   self.schema.fields[i].name))             # <<<<<<<<<<<<<<
 *         continue
 *       component_coder = self.components[i]  # for typing
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(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_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "apache_beam/coders/coder_impl.py":1764
 *       if attr is None:
 *         if not self.field_nullable[i]:
 *           raise ValueError(             # <<<<<<<<<<<<<<
 *               "Attempted to encode null for non-nullable field \"{}\".".format(
 *                   self.schema.fields[i].name))
 */
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1764, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 1764, __pyx_L1_error)

        /* "apache_beam/coders/coder_impl.py":1763
 *       attr = attrs[i]
 *       if attr is None:
 *         if not self.field_nullable[i]:             # <<<<<<<<<<<<<<
 *           raise ValueError(
 *               "Attempted to encode null for non-nullable field \"{}\".".format(
 */
      }

      /* "apache_beam/coders/coder_impl.py":1767
 *               "Attempted to encode null for non-nullable field \"{}\".".format(
 *                   self.schema.fields[i].name))
 *         continue             # <<<<<<<<<<<<<<
 *       component_coder = self.components[i]  # for typing
 *       component_coder.encode_to_stream(attr, out, True)
 */
      goto __pyx_L19_continue;

      /* "apache_beam/coders/coder_impl.py":1762
 *         i = self.encoding_positions_argsort[i]
 *       attr = attrs[i]
 *       if attr is None:             # <<<<<<<<<<<<<<
 *         if not self.field_nullable[i]:
 *           raise ValueError(
 */
    }

    /* "apache_beam/coders/coder_impl.py":1768
 *                   self.schema.fields[i].name))
 *         continue
 *       component_coder = self.components[i]  # for typing             # <<<<<<<<<<<<<<
 *       component_coder.encode_to_stream(attr, out, True)
 * 
 */
    if (unlikely(__pyx_v_self->components == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1768, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->components, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_component_coder, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":1769
 *         continue
 *       component_coder = self.components[i]  # for typing
 *       component_coder.encode_to_stream(attr, out, True)             # <<<<<<<<<<<<<<
 * 
 *   def _row_column_encoders(self, columns):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_component_coder->__pyx_vtab)->encode_to_stream(__pyx_v_component_coder, __pyx_v_attr, __pyx_v_out, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_L19_continue:;
  }

  /* "apache_beam/coders/coder_impl.py":1733
 *         field.type.nullable for field in self.schema.fields)
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_var_int64(self.num_fields)
 *     attrs = [getattr(value, name) for name in self.field_names]
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_component_coder);
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1733, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1733, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1733, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1733, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1733, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1771
 *       component_coder.encode_to_stream(attr, out, True)
 * 
 *   def _row_column_encoders(self, columns):             # <<<<<<<<<<<<<<
 *     return [
 *         RowColumnEncoder.create(
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders(PyObject *__pyx_v_self, PyObject *__pyx_v_columns); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders = {"_row_column_encoders", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders(PyObject *__pyx_v_self, PyObject *__pyx_v_columns) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_row_column_encoders (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_4_row_column_encoders(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_columns));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_4_row_column_encoders(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns) {
  PyObject *__pyx_9genexpr13__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr13__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_row_column_encoders", 0);

  /* "apache_beam/coders/coder_impl.py":1772
 * 
 *   def _row_column_encoders(self, columns):
 *     return [             # <<<<<<<<<<<<<<
 *         RowColumnEncoder.create(
 *             self.schema.fields[i].type.atomic_type,
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1772, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_2 = __pyx_int_0;

    /* "apache_beam/coders/coder_impl.py":1777
 *             self.components[i],
 *             columns[name]) for i,
 *         name in enumerate(self.field_names)             # <<<<<<<<<<<<<<
 *     ]
 * 
 */
    __pyx_t_3 = __pyx_v_self->field_names; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    for (;;) {
      if (__pyx_t_4 >= 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_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1777, __pyx_L5_error)
      #else
      __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1777, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_name, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "apache_beam/coders/coder_impl.py":1776
 *             self.schema.fields[i].type.atomic_type,
 *             self.components[i],
 *             columns[name]) for i,             # <<<<<<<<<<<<<<
 *         name in enumerate(self.field_names)
 *     ]
 */
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_i, __pyx_t_2);

      /* "apache_beam/coders/coder_impl.py":1777
 *             self.components[i],
 *             columns[name]) for i,
 *         name in enumerate(self.field_names)             # <<<<<<<<<<<<<<
 *     ]
 * 
 */
      __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1777, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2);
      __pyx_t_2 = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "apache_beam/coders/coder_impl.py":1773
 *   def _row_column_encoders(self, columns):
 *     return [
 *         RowColumnEncoder.create(             # <<<<<<<<<<<<<<
 *             self.schema.fields[i].type.atomic_type,
 *             self.components[i],
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder), __pyx_n_s_create); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1773, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "apache_beam/coders/coder_impl.py":1774
 *     return [
 *         RowColumnEncoder.create(
 *             self.schema.fields[i].type.atomic_type,             # <<<<<<<<<<<<<<
 *             self.components[i],
 *             columns[name]) for i,
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1774, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_9genexpr13__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1774, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1774, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_atomic_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1774, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":1775
 *         RowColumnEncoder.create(
 *             self.schema.fields[i].type.atomic_type,
 *             self.components[i],             # <<<<<<<<<<<<<<
 *             columns[name]) for i,
 *         name in enumerate(self.field_names)
 */
      if (unlikely(__pyx_v_self->components == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1775, __pyx_L5_error)
      }
      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_self->components, __pyx_9genexpr13__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1775, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);

      /* "apache_beam/coders/coder_impl.py":1776
 *             self.schema.fields[i].type.atomic_type,
 *             self.components[i],
 *             columns[name]) for i,             # <<<<<<<<<<<<<<
 *         name in enumerate(self.field_names)
 *     ]
 */
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_columns, __pyx_9genexpr13__pyx_v_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1776, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_8, __pyx_t_7, __pyx_t_9};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1773, __pyx_L5_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
        PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_8, __pyx_t_7, __pyx_t_9};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1773, __pyx_L5_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1773, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_9);
        __pyx_t_8 = 0;
        __pyx_t_7 = 0;
        __pyx_t_9 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1773, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1772, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_i); __pyx_9genexpr13__pyx_v_i = 0;
    __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_name); __pyx_9genexpr13__pyx_v_name = 0;
    goto __pyx_L8_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_i); __pyx_9genexpr13__pyx_v_i = 0;
    __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_name); __pyx_9genexpr13__pyx_v_name = 0;
    goto __pyx_L1_error;
    __pyx_L8_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1771
 *       component_coder.encode_to_stream(attr, out, True)
 * 
 *   def _row_column_encoders(self, columns):             # <<<<<<<<<<<<<<
 *     return [
 *         RowColumnEncoder.create(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl._row_column_encoders", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1780
 *     ]
 * 
 *   def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out):             # <<<<<<<<<<<<<<
 *     attrs = self._row_column_encoders(columns)
 *     n = len(next(iter(columns.values())))
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_batch_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_skip_dispatch) {
  int __pyx_v_i;
  size_t __pyx_v_k;
  size_t __pyx_v_n;
  __Pyx_memviewslice __pyx_v_null_flags = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_null_bits = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_v_has_null_bits = { 0, 0, { 0 }, { 0 }, { 0 } };
  PyObject *__pyx_v_attrs = NULL;
  PyObject *__pyx_v_null_flags_py = NULL;
  long __pyx_v_null_bits_len;
  PyObject *__pyx_v_null_bits_py = NULL;
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_v_attr_null_flags = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } };
  __Pyx_memviewslice __pyx_t_15 = { 0, 0, { 0 }, { 0 }, { 0 } };
  size_t __pyx_t_16;
  size_t __pyx_t_17;
  size_t __pyx_t_18;
  size_t __pyx_t_19;
  long __pyx_t_20;
  long __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  int __pyx_t_23;
  int __pyx_t_24;
  int __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_batch_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_batch_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream)) {
        __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_columns, ((PyObject *)__pyx_v_out)};
          __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, 1780, __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_columns, ((PyObject *)__pyx_v_out)};
          __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, 1780, __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, 1780, __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_columns);
          __Pyx_GIVEREF(__pyx_v_columns);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_columns);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_out));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1780, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1781
 * 
 *   def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out):
 *     attrs = self._row_column_encoders(columns)             # <<<<<<<<<<<<<<
 *     n = len(next(iter(columns.values())))
 *     if self.has_nullable_fields:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_row_column_encoders); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_columns) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_columns);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_attrs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1782
 *   def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out):
 *     attrs = self._row_column_encoders(columns)
 *     n = len(next(iter(columns.values())))             # <<<<<<<<<<<<<<
 *     if self.has_nullable_fields:
 *       null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8)
 */
  if (unlikely(__pyx_v_columns == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
    __PYX_ERR(0, 1782, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1782, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_7;

  /* "apache_beam/coders/coder_impl.py":1783
 *     attrs = self._row_column_encoders(columns)
 *     n = len(next(iter(columns.values())))
 *     if self.has_nullable_fields:             # <<<<<<<<<<<<<<
 *       null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8)
 *       null_bits_len = (self.num_fields + 7) // 8
 */
  __pyx_t_8 = (__pyx_v_self->has_nullable_fields != 0);
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":1784
 *     n = len(next(iter(columns.values())))
 *     if self.has_nullable_fields:
 *       null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8)             # <<<<<<<<<<<<<<
 *       null_bits_len = (self.num_fields + 7) // 8
 *       null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->num_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1784, __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_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_uint8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_null_flags_py = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":1785
 *     if self.has_nullable_fields:
 *       null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8)
 *       null_bits_len = (self.num_fields + 7) // 8             # <<<<<<<<<<<<<<
 *       null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8)
 *       for i, attr in enumerate(attrs):
 */
    __pyx_v_null_bits_len = __Pyx_div_long((__pyx_v_self->num_fields + 7), 8);

    /* "apache_beam/coders/coder_impl.py":1786
 *       null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8)
 *       null_bits_len = (self.num_fields + 7) // 8
 *       null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8)             # <<<<<<<<<<<<<<
 *       for i, attr in enumerate(attrs):
 *         attr_null_flags = attr.null_flags()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_null_bits_len); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_null_bits_py = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1787
 *       null_bits_len = (self.num_fields + 7) // 8
 *       null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8)
 *       for i, attr in enumerate(attrs):             # <<<<<<<<<<<<<<
 *         attr_null_flags = attr.null_flags()
 *         if attr_null_flags is not None and attr_null_flags.any():
 */
    __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_v_attrs)) || PyTuple_CheckExact(__pyx_v_attrs)) {
      __pyx_t_1 = __pyx_v_attrs; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1787, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1787, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1787, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1787, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1787, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1787, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_v_i = __pyx_t_5;
      __pyx_t_5 = (__pyx_t_5 + 1);

      /* "apache_beam/coders/coder_impl.py":1788
 *       null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8)
 *       for i, attr in enumerate(attrs):
 *         attr_null_flags = attr.null_flags()             # <<<<<<<<<<<<<<
 *         if attr_null_flags is not None and attr_null_flags.any():
 *           null_flags_py[:, i] = attr_null_flags
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_null_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_attr_null_flags, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":1789
 *       for i, attr in enumerate(attrs):
 *         attr_null_flags = attr.null_flags()
 *         if attr_null_flags is not None and attr_null_flags.any():             # <<<<<<<<<<<<<<
 *           null_flags_py[:, i] = attr_null_flags
 *           null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8)
 */
      __pyx_t_10 = (__pyx_v_attr_null_flags != Py_None);
      __pyx_t_11 = (__pyx_t_10 != 0);
      if (__pyx_t_11) {
      } else {
        __pyx_t_8 = __pyx_t_11;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr_null_flags, __pyx_n_s_any); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1789, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1789, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __pyx_t_11;
      __pyx_L7_bool_binop_done:;
      if (__pyx_t_8) {

        /* "apache_beam/coders/coder_impl.py":1790
 *         attr_null_flags = attr.null_flags()
 *         if attr_null_flags is not None and attr_null_flags.any():
 *           null_flags_py[:, i] = attr_null_flags             # <<<<<<<<<<<<<<
 *           null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8)
 *       has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8)
 */
        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1790, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1790, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_slice__14);
        __Pyx_GIVEREF(__pyx_slice__14);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_slice__14);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
        __pyx_t_2 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_null_flags_py, __pyx_t_3, __pyx_v_attr_null_flags) < 0)) __PYX_ERR(0, 1790, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "apache_beam/coders/coder_impl.py":1791
 *         if attr_null_flags is not None and attr_null_flags.any():
 *           null_flags_py[:, i] = attr_null_flags
 *           null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8)             # <<<<<<<<<<<<<<
 *       has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8)
 *       null_bits = null_bits_py
 */
        __pyx_t_3 = __Pyx_PyInt_From_long(__Pyx_div_long(__pyx_v_i, 8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_slice__14);
        __Pyx_GIVEREF(__pyx_slice__14);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_slice__14);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_null_bits_py, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyInt_From_long(__Pyx_mod_long(__pyx_v_i, 8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
          }
        }
        __pyx_t_6 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyNumber_Lshift(__pyx_v_attr_null_flags, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyNumber_InPlaceOr(__pyx_t_3, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_null_bits_py, __pyx_t_2, __pyx_t_6) < 0)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "apache_beam/coders/coder_impl.py":1789
 *       for i, attr in enumerate(attrs):
 *         attr_null_flags = attr.null_flags()
 *         if attr_null_flags is not None and attr_null_flags.any():             # <<<<<<<<<<<<<<
 *           null_flags_py[:, i] = attr_null_flags
 *           null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8)
 */
      }

      /* "apache_beam/coders/coder_impl.py":1787
 *       null_bits_len = (self.num_fields + 7) // 8
 *       null_bits_py = np.zeros((n, null_bits_len), dtype=np.uint8)
 *       for i, attr in enumerate(attrs):             # <<<<<<<<<<<<<<
 *         attr_null_flags = attr.null_flags()
 *         if attr_null_flags is not None and attr_null_flags.any():
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1792
 *           null_flags_py[:, i] = attr_null_flags
 *           null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8)
 *       has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8)             # <<<<<<<<<<<<<<
 *       null_bits = null_bits_py
 *       null_flags = null_flags_py
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_null_bits_py, __pyx_n_s_sum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 1792, __pyx_L1_error)
    __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyInt_NeObjC(__pyx_t_12, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_astype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_uint8_t(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 1792, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_has_null_bits = __pyx_t_14;
    __pyx_t_14.memview = NULL;
    __pyx_t_14.data = NULL;

    /* "apache_beam/coders/coder_impl.py":1793
 *           null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8)
 *       has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8)
 *       null_bits = null_bits_py             # <<<<<<<<<<<<<<
 *       null_flags = null_flags_py
 *     else:
 */
    __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn_uint8_t(__pyx_v_null_bits_py, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 1793, __pyx_L1_error)
    __pyx_v_null_bits = __pyx_t_15;
    __pyx_t_15.memview = NULL;
    __pyx_t_15.data = NULL;

    /* "apache_beam/coders/coder_impl.py":1794
 *       has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8)
 *       null_bits = null_bits_py
 *       null_flags = null_flags_py             # <<<<<<<<<<<<<<
 *     else:
 *       has_null_bits = np.zeros((n, ), dtype=np.uint8)
 */
    __pyx_t_15 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn_uint8_t(__pyx_v_null_flags_py, PyBUF_WRITABLE); if (unlikely(!__pyx_t_15.memview)) __PYX_ERR(0, 1794, __pyx_L1_error)
    __pyx_v_null_flags = __pyx_t_15;
    __pyx_t_15.memview = NULL;
    __pyx_t_15.data = NULL;

    /* "apache_beam/coders/coder_impl.py":1783
 *     attrs = self._row_column_encoders(columns)
 *     n = len(next(iter(columns.values())))
 *     if self.has_nullable_fields:             # <<<<<<<<<<<<<<
 *       null_flags_py = np.zeros((n, self.num_fields), dtype=np.uint8)
 *       null_bits_len = (self.num_fields + 7) // 8
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1796
 *       null_flags = null_flags_py
 *     else:
 *       has_null_bits = np.zeros((n, ), dtype=np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     for k in range(n):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __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 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_uint8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dc_nn_uint8_t(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 1796, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_has_null_bits = __pyx_t_14;
    __pyx_t_14.memview = NULL;
    __pyx_t_14.data = NULL;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":1798
 *       has_null_bits = np.zeros((n, ), dtype=np.uint8)
 * 
 *     for k in range(n):             # <<<<<<<<<<<<<<
 *       out.write_var_int64(self.num_fields)
 *       if has_null_bits[k]:
 */
  __pyx_t_16 = __pyx_v_n;
  __pyx_t_17 = __pyx_t_16;
  for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
    __pyx_v_k = __pyx_t_18;

    /* "apache_beam/coders/coder_impl.py":1799
 * 
 *     for k in range(n):
 *       out.write_var_int64(self.num_fields)             # <<<<<<<<<<<<<<
 *       if has_null_bits[k]:
 *         out.write_byte(null_bits_len)
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_v_self->num_fields, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1799, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "apache_beam/coders/coder_impl.py":1800
 *     for k in range(n):
 *       out.write_var_int64(self.num_fields)
 *       if has_null_bits[k]:             # <<<<<<<<<<<<<<
 *         out.write_byte(null_bits_len)
 *         for i in range(null_bits_len):
 */
    __pyx_t_19 = __pyx_v_k;
    __pyx_t_5 = -1;
    if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_has_null_bits.shape[0])) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      __PYX_ERR(0, 1800, __pyx_L1_error)
    }
    __pyx_t_8 = ((*((uint8_t *) ( /* dim=0 */ ((char *) (((uint8_t *) __pyx_v_has_null_bits.data) + __pyx_t_19)) ))) != 0);
    if (__pyx_t_8) {

      /* "apache_beam/coders/coder_impl.py":1801
 *       out.write_var_int64(self.num_fields)
 *       if has_null_bits[k]:
 *         out.write_byte(null_bits_len)             # <<<<<<<<<<<<<<
 *         for i in range(null_bits_len):
 *           out.write_byte(null_bits[k, i])
 */
      __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, __pyx_v_null_bits_len, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "apache_beam/coders/coder_impl.py":1802
 *       if has_null_bits[k]:
 *         out.write_byte(null_bits_len)
 *         for i in range(null_bits_len):             # <<<<<<<<<<<<<<
 *           out.write_byte(null_bits[k, i])
 *       else:
 */
      __pyx_t_20 = __pyx_v_null_bits_len;
      __pyx_t_21 = __pyx_t_20;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_21; __pyx_t_5+=1) {
        __pyx_v_i = __pyx_t_5;

        /* "apache_beam/coders/coder_impl.py":1803
 *         out.write_byte(null_bits_len)
 *         for i in range(null_bits_len):
 *           out.write_byte(null_bits[k, i])             # <<<<<<<<<<<<<<
 *       else:
 *         out.write_byte(0)
 */
        if (unlikely(!__pyx_v_null_bits.memview)) { __Pyx_RaiseUnboundLocalError("null_bits"); __PYX_ERR(0, 1803, __pyx_L1_error) }
        __pyx_t_19 = __pyx_v_k;
        __pyx_t_22 = __pyx_v_i;
        __pyx_t_23 = -1;
        if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_null_bits.shape[0])) __pyx_t_23 = 0;
        if (__pyx_t_22 < 0) {
          __pyx_t_22 += __pyx_v_null_bits.shape[1];
          if (unlikely(__pyx_t_22 < 0)) __pyx_t_23 = 1;
        } else if (unlikely(__pyx_t_22 >= __pyx_v_null_bits.shape[1])) __pyx_t_23 = 1;
        if (unlikely(__pyx_t_23 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_23);
          __PYX_ERR(0, 1803, __pyx_L1_error)
        }
        __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, (*((uint8_t *) ( /* dim=1 */ ((char *) (((uint8_t *) ( /* dim=0 */ (__pyx_v_null_bits.data + __pyx_t_19 * __pyx_v_null_bits.strides[0]) )) + __pyx_t_22)) ))), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1803, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "apache_beam/coders/coder_impl.py":1800
 *     for k in range(n):
 *       out.write_var_int64(self.num_fields)
 *       if has_null_bits[k]:             # <<<<<<<<<<<<<<
 *         out.write_byte(null_bits_len)
 *         for i in range(null_bits_len):
 */
      goto __pyx_L11;
    }

    /* "apache_beam/coders/coder_impl.py":1805
 *           out.write_byte(null_bits[k, i])
 *       else:
 *         out.write_byte(0)             # <<<<<<<<<<<<<<
 *       for i in range(self.num_fields):
 *         if not self.encoding_positions_are_trivial:
 */
    /*else*/ {
      __pyx_t_3 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_byte(__pyx_v_out, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L11:;

    /* "apache_beam/coders/coder_impl.py":1806
 *       else:
 *         out.write_byte(0)
 *       for i in range(self.num_fields):             # <<<<<<<<<<<<<<
 *         if not self.encoding_positions_are_trivial:
 *           i = self.encoding_positions_argsort[i]
 */
    __pyx_t_5 = __pyx_v_self->num_fields;
    __pyx_t_23 = __pyx_t_5;
    for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
      __pyx_v_i = __pyx_t_24;

      /* "apache_beam/coders/coder_impl.py":1807
 *         out.write_byte(0)
 *       for i in range(self.num_fields):
 *         if not self.encoding_positions_are_trivial:             # <<<<<<<<<<<<<<
 *           i = self.encoding_positions_argsort[i]
 *         if has_null_bits[k] and null_flags[k, i]:
 */
      __pyx_t_8 = ((!(__pyx_v_self->encoding_positions_are_trivial != 0)) != 0);
      if (__pyx_t_8) {

        /* "apache_beam/coders/coder_impl.py":1808
 *       for i in range(self.num_fields):
 *         if not self.encoding_positions_are_trivial:
 *           i = self.encoding_positions_argsort[i]             # <<<<<<<<<<<<<<
 *         if has_null_bits[k] and null_flags[k, i]:
 *           if not self.field_nullable[i]:
 */
        if (unlikely(__pyx_v_self->encoding_positions_argsort == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 1808, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->encoding_positions_argsort, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_25 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_25 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1808, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_i = __pyx_t_25;

        /* "apache_beam/coders/coder_impl.py":1807
 *         out.write_byte(0)
 *       for i in range(self.num_fields):
 *         if not self.encoding_positions_are_trivial:             # <<<<<<<<<<<<<<
 *           i = self.encoding_positions_argsort[i]
 *         if has_null_bits[k] and null_flags[k, i]:
 */
      }

      /* "apache_beam/coders/coder_impl.py":1809
 *         if not self.encoding_positions_are_trivial:
 *           i = self.encoding_positions_argsort[i]
 *         if has_null_bits[k] and null_flags[k, i]:             # <<<<<<<<<<<<<<
 *           if not self.field_nullable[i]:
 *             raise ValueError(
 */
      __pyx_t_19 = __pyx_v_k;
      __pyx_t_25 = -1;
      if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_has_null_bits.shape[0])) __pyx_t_25 = 0;
      if (unlikely(__pyx_t_25 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_25);
        __PYX_ERR(0, 1809, __pyx_L1_error)
      }
      __pyx_t_11 = ((*((uint8_t *) ( /* dim=0 */ ((char *) (((uint8_t *) __pyx_v_has_null_bits.data) + __pyx_t_19)) ))) != 0);
      if (__pyx_t_11) {
      } else {
        __pyx_t_8 = __pyx_t_11;
        goto __pyx_L18_bool_binop_done;
      }
      if (unlikely(!__pyx_v_null_flags.memview)) { __Pyx_RaiseUnboundLocalError("null_flags"); __PYX_ERR(0, 1809, __pyx_L1_error) }
      __pyx_t_19 = __pyx_v_k;
      __pyx_t_22 = __pyx_v_i;
      __pyx_t_25 = -1;
      if (unlikely(__pyx_t_19 >= (size_t)__pyx_v_null_flags.shape[0])) __pyx_t_25 = 0;
      if (__pyx_t_22 < 0) {
        __pyx_t_22 += __pyx_v_null_flags.shape[1];
        if (unlikely(__pyx_t_22 < 0)) __pyx_t_25 = 1;
      } else if (unlikely(__pyx_t_22 >= __pyx_v_null_flags.shape[1])) __pyx_t_25 = 1;
      if (unlikely(__pyx_t_25 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_25);
        __PYX_ERR(0, 1809, __pyx_L1_error)
      }
      __pyx_t_11 = ((*((uint8_t *) ( /* dim=1 */ ((char *) (((uint8_t *) ( /* dim=0 */ (__pyx_v_null_flags.data + __pyx_t_19 * __pyx_v_null_flags.strides[0]) )) + __pyx_t_22)) ))) != 0);
      __pyx_t_8 = __pyx_t_11;
      __pyx_L18_bool_binop_done:;
      if (__pyx_t_8) {

        /* "apache_beam/coders/coder_impl.py":1810
 *           i = self.encoding_positions_argsort[i]
 *         if has_null_bits[k] and null_flags[k, i]:
 *           if not self.field_nullable[i]:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Attempted to encode null for non-nullable field \"{}\".".
 */
        if (unlikely(__pyx_v_self->field_nullable == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 1810, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->field_nullable, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1810, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1810, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_11 = ((!__pyx_t_8) != 0);
        if (unlikely(__pyx_t_11)) {

          /* "apache_beam/coders/coder_impl.py":1812
 *           if not self.field_nullable[i]:
 *             raise ValueError(
 *                 "Attempted to encode null for non-nullable field \"{}\".".             # <<<<<<<<<<<<<<
 *                 format(self.schema.fields[i].name))
 *         else:
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Attempted_to_encode_null_for_non, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1812, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);

          /* "apache_beam/coders/coder_impl.py":1813
 *             raise ValueError(
 *                 "Attempted to encode null for non-nullable field \"{}\".".
 *                 format(self.schema.fields[i].name))             # <<<<<<<<<<<<<<
 *         else:
 *           cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out)
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1813, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_12)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
            }
          }
          __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_12, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1813, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "apache_beam/coders/coder_impl.py":1811
 *         if has_null_bits[k] and null_flags[k, i]:
 *           if not self.field_nullable[i]:
 *             raise ValueError(             # <<<<<<<<<<<<<<
 *                 "Attempted to encode null for non-nullable field \"{}\".".
 *                 format(self.schema.fields[i].name))
 */
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(0, 1811, __pyx_L1_error)

          /* "apache_beam/coders/coder_impl.py":1810
 *           i = self.encoding_positions_argsort[i]
 *         if has_null_bits[k] and null_flags[k, i]:
 *           if not self.field_nullable[i]:             # <<<<<<<<<<<<<<
 *             raise ValueError(
 *                 "Attempted to encode null for non-nullable field \"{}\".".
 */
        }

        /* "apache_beam/coders/coder_impl.py":1809
 *         if not self.encoding_positions_are_trivial:
 *           i = self.encoding_positions_argsort[i]
 *         if has_null_bits[k] and null_flags[k, i]:             # <<<<<<<<<<<<<<
 *           if not self.field_nullable[i]:
 *             raise ValueError(
 */
        goto __pyx_L17;
      }

      /* "apache_beam/coders/coder_impl.py":1815
 *                 format(self.schema.fields[i].name))
 *         else:
 *           cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
      /*else*/ {
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_attrs, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1815, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_t_2)->__pyx_vtab)->encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_t_2), __pyx_v_k, __pyx_v_out); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1815, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_L17:;
    }
  }

  /* "apache_beam/coders/coder_impl.py":1780
 *     ]
 * 
 *   def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out):             # <<<<<<<<<<<<<<
 *     attrs = self._row_column_encoders(columns)
 *     n = len(next(iter(columns.values())))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __PYX_XDEC_MEMVIEW(&__pyx_t_14, 1);
  __PYX_XDEC_MEMVIEW(&__pyx_t_15, 1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_batch_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __PYX_XDEC_MEMVIEW(&__pyx_v_null_flags, 1);
  __PYX_XDEC_MEMVIEW(&__pyx_v_null_bits, 1);
  __PYX_XDEC_MEMVIEW(&__pyx_v_has_null_bits, 1);
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_v_null_flags_py);
  __Pyx_XDECREF(__pyx_v_null_bits_py);
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_v_attr_null_flags);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream = {"encode_batch_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_columns = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_batch_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_columns,&__pyx_n_s_out,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_columns)) != 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_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_batch_to_stream", 1, 2, 2, 1); __PYX_ERR(0, 1780, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_batch_to_stream") < 0)) __PYX_ERR(0, 1780, __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_columns = ((PyObject*)values[0]);
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_batch_to_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1780, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_batch_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyDict_Type), 1, "columns", 1))) __PYX_ERR(0, 1780, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1780, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_6encode_batch_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_columns, __pyx_v_out);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_6encode_batch_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_columns, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_batch_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_batch_to_stream(__pyx_v_self, __pyx_v_columns, __pyx_v_out, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.encode_batch_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1817
 *           cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     nvals = in_stream.read_var_int64()
 *     null_mask_len = in_stream.read_var_int64()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch) {
  int __pyx_v_i;
  int64_t __pyx_v_nvals;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_component_coder = 0;
  __pyx_t_11apache_beam_6coders_10coder_impl_char_ptr __pyx_v_null_mask_c;
  int64_t __pyx_v_null_mask_len;
  CYTHON_UNUSED PyObject *__pyx_v_null_mask_py = NULL;
  PyObject *__pyx_v_sorted_components = NULL;
  PyObject *__pyx_v_item = NULL;
  int __pyx_9genexpr14__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int64_t __pyx_t_8;
  int __pyx_t_9;
  __pyx_t_11apache_beam_6coders_10coder_impl_char_ptr __pyx_t_10;
  int64_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1817, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1817, __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_in_stream), __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, 1817, __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_in_stream), __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, 1817, __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, 1817, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1817, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1818
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     nvals = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *     null_mask_len = in_stream.read_var_int64()
 *     if null_mask_len:
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1818, __pyx_L1_error)
  __pyx_v_nvals = __pyx_t_8;

  /* "apache_beam/coders/coder_impl.py":1819
 *   def decode_from_stream(self, in_stream, nested):
 *     nvals = in_stream.read_var_int64()
 *     null_mask_len = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *     if null_mask_len:
 *       # pylint: disable=unused-variable
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1819, __pyx_L1_error)
  __pyx_v_null_mask_len = __pyx_t_8;

  /* "apache_beam/coders/coder_impl.py":1820
 *     nvals = in_stream.read_var_int64()
 *     null_mask_len = in_stream.read_var_int64()
 *     if null_mask_len:             # <<<<<<<<<<<<<<
 *       # pylint: disable=unused-variable
 *       null_mask_c = null_mask_py = in_stream.read(null_mask_len)
 */
  __pyx_t_9 = (__pyx_v_null_mask_len != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":1822
 *     if null_mask_len:
 *       # pylint: disable=unused-variable
 *       null_mask_c = null_mask_py = in_stream.read(null_mask_len)             # <<<<<<<<<<<<<<
 * 
 *     # Note that if this coder's schema has *fewer* attributes than the encoded
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read(__pyx_v_in_stream, __pyx_v_null_mask_len, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 1822, __pyx_L1_error)
    }
    __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 1822, __pyx_L1_error)
    __pyx_v_null_mask_c = __pyx_t_10;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_null_mask_py = ((PyObject*)__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1820
 *     nvals = in_stream.read_var_int64()
 *     null_mask_len = in_stream.read_var_int64()
 *     if null_mask_len:             # <<<<<<<<<<<<<<
 *       # pylint: disable=unused-variable
 *       null_mask_c = null_mask_py = in_stream.read(null_mask_len)
 */
  }

  /* "apache_beam/coders/coder_impl.py":1828
 *     # here because we only decode as many values as we have coders for.
 * 
 *     sorted_components = []             # <<<<<<<<<<<<<<
 *     for i in range(min(self.num_fields, nvals)):
 *       if not self.encoding_positions_are_trivial:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_sorted_components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1829
 * 
 *     sorted_components = []
 *     for i in range(min(self.num_fields, nvals)):             # <<<<<<<<<<<<<<
 *       if not self.encoding_positions_are_trivial:
 *         i = self.encoding_positions_argsort[i]
 */
  __pyx_t_8 = __pyx_v_nvals;
  __pyx_t_6 = __pyx_v_self->num_fields;
  if (((__pyx_t_8 < __pyx_t_6) != 0)) {
    __pyx_t_11 = __pyx_t_8;
  } else {
    __pyx_t_11 = __pyx_t_6;
  }
  __pyx_t_8 = __pyx_t_11;
  __pyx_t_11 = __pyx_t_8;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_11; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "apache_beam/coders/coder_impl.py":1830
 *     sorted_components = []
 *     for i in range(min(self.num_fields, nvals)):
 *       if not self.encoding_positions_are_trivial:             # <<<<<<<<<<<<<<
 *         i = self.encoding_positions_argsort[i]
 *       if (null_mask_len and i >> 3 < null_mask_len and
 */
    __pyx_t_9 = ((!(__pyx_v_self->encoding_positions_are_trivial != 0)) != 0);
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":1831
 *     for i in range(min(self.num_fields, nvals)):
 *       if not self.encoding_positions_are_trivial:
 *         i = self.encoding_positions_argsort[i]             # <<<<<<<<<<<<<<
 *       if (null_mask_len and i >> 3 < null_mask_len and
 *           null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 */
      if (unlikely(__pyx_v_self->encoding_positions_argsort == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1831, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->encoding_positions_argsort, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1831, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_i = __pyx_t_12;

      /* "apache_beam/coders/coder_impl.py":1830
 *     sorted_components = []
 *     for i in range(min(self.num_fields, nvals)):
 *       if not self.encoding_positions_are_trivial:             # <<<<<<<<<<<<<<
 *         i = self.encoding_positions_argsort[i]
 *       if (null_mask_len and i >> 3 < null_mask_len and
 */
    }

    /* "apache_beam/coders/coder_impl.py":1832
 *       if not self.encoding_positions_are_trivial:
 *         i = self.encoding_positions_argsort[i]
 *       if (null_mask_len and i >> 3 < null_mask_len and             # <<<<<<<<<<<<<<
 *           null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 *         item = None
 */
    __pyx_t_13 = (__pyx_v_null_mask_len != 0);
    if (__pyx_t_13) {
    } else {
      __pyx_t_9 = __pyx_t_13;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_13 = (((__pyx_v_i >> 3) < __pyx_v_null_mask_len) != 0);
    if (__pyx_t_13) {
    } else {
      __pyx_t_9 = __pyx_t_13;
      goto __pyx_L8_bool_binop_done;
    }

    /* "apache_beam/coders/coder_impl.py":1833
 *         i = self.encoding_positions_argsort[i]
 *       if (null_mask_len and i >> 3 < null_mask_len and
 *           null_mask_c[i >> 3] & (0x01 << (i & 0x07))):             # <<<<<<<<<<<<<<
 *         item = None
 *       else:
 */
    __pyx_t_13 = (((__pyx_v_null_mask_c[(__pyx_v_i >> 3)]) & (0x01 << (__pyx_v_i & 0x07))) != 0);
    __pyx_t_9 = __pyx_t_13;
    __pyx_L8_bool_binop_done:;

    /* "apache_beam/coders/coder_impl.py":1832
 *       if not self.encoding_positions_are_trivial:
 *         i = self.encoding_positions_argsort[i]
 *       if (null_mask_len and i >> 3 < null_mask_len and             # <<<<<<<<<<<<<<
 *           null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 *         item = None
 */
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":1834
 *       if (null_mask_len and i >> 3 < null_mask_len and
 *           null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 *         item = None             # <<<<<<<<<<<<<<
 *       else:
 *         component_coder = self.components[i]  # for typing
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_item, Py_None);

      /* "apache_beam/coders/coder_impl.py":1832
 *       if not self.encoding_positions_are_trivial:
 *         i = self.encoding_positions_argsort[i]
 *       if (null_mask_len and i >> 3 < null_mask_len and             # <<<<<<<<<<<<<<
 *           null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 *         item = None
 */
      goto __pyx_L7;
    }

    /* "apache_beam/coders/coder_impl.py":1836
 *         item = None
 *       else:
 *         component_coder = self.components[i]  # for typing             # <<<<<<<<<<<<<<
 *         item = component_coder.decode_from_stream(in_stream, True)
 *       sorted_components.append(item)
 */
    /*else*/ {
      if (unlikely(__pyx_v_self->components == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1836, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->components, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __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_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1836, __pyx_L1_error)
      __Pyx_XDECREF_SET(__pyx_v_component_coder, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1837
 *       else:
 *         component_coder = self.components[i]  # for typing
 *         item = component_coder.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *       sorted_components.append(item)
 * 
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_component_coder->__pyx_vtab)->decode_from_stream(__pyx_v_component_coder, __pyx_v_in_stream, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1837, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L7:;

    /* "apache_beam/coders/coder_impl.py":1838
 *         component_coder = self.components[i]  # for typing
 *         item = component_coder.decode_from_stream(in_stream, True)
 *       sorted_components.append(item)             # <<<<<<<<<<<<<<
 * 
 *     # If this coder's schema has more attributes than the encoded value, then
 */
    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_sorted_components, __pyx_v_item); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1838, __pyx_L1_error)
  }

  /* "apache_beam/coders/coder_impl.py":1842
 *     # If this coder's schema has more attributes than the encoded value, then
 *     # the schema must have changed. Populate the unencoded fields with nulls.
 *     while len(sorted_components) < self.num_fields:             # <<<<<<<<<<<<<<
 *       sorted_components.append(None)
 * 
 */
  while (1) {
    __pyx_t_15 = PyList_GET_SIZE(__pyx_v_sorted_components); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1842, __pyx_L1_error)
    __pyx_t_9 = ((__pyx_t_15 < __pyx_v_self->num_fields) != 0);
    if (!__pyx_t_9) break;

    /* "apache_beam/coders/coder_impl.py":1843
 *     # the schema must have changed. Populate the unencoded fields with nulls.
 *     while len(sorted_components) < self.num_fields:
 *       sorted_components.append(None)             # <<<<<<<<<<<<<<
 * 
 *     return self.constructor(
 */
    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_sorted_components, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1843, __pyx_L1_error)
  }

  /* "apache_beam/coders/coder_impl.py":1845
 *       sorted_components.append(None)
 * 
 *     return self.constructor(             # <<<<<<<<<<<<<<
 *         *(
 *             sorted_components if self.encoding_positions_are_trivial else
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":1847
 *     return self.constructor(
 *         *(
 *             sorted_components if self.encoding_positions_are_trivial else             # <<<<<<<<<<<<<<
 *             [sorted_components[i] for i in self.encoding_positions]))
 * 
 */
  if ((__pyx_v_self->encoding_positions_are_trivial != 0)) {
    __Pyx_INCREF(__pyx_v_sorted_components);
    __pyx_t_1 = __pyx_v_sorted_components;
  } else {
    { /* enter inner scope */

      /* "apache_beam/coders/coder_impl.py":1848
 *         *(
 *             sorted_components if self.encoding_positions_are_trivial else
 *             [sorted_components[i] for i in self.encoding_positions]))             # <<<<<<<<<<<<<<
 * 
 *   def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream):
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__pyx_v_self->encoding_positions == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 1848, __pyx_L1_error)
      }
      __pyx_t_4 = __pyx_v_self->encoding_positions; __Pyx_INCREF(__pyx_t_4); __pyx_t_15 = 0;
      for (;;) {
        if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_7); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 1848, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_9genexpr14__pyx_v_i = __pyx_t_6;
        __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_sorted_components, __pyx_9genexpr14__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1848, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } /* exit inner scope */
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":1845
 *       sorted_components.append(None)
 * 
 *     return self.constructor(             # <<<<<<<<<<<<<<
 *         *(
 *             sorted_components if self.encoding_positions_are_trivial else
 */
  __pyx_t_2 = PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->constructor, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1817
 *           cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     nvals = in_stream.read_var_int64()
 *     null_mask_len = in_stream.read_var_int64()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_component_coder);
  __Pyx_XDECREF(__pyx_v_null_mask_py);
  __Pyx_XDECREF(__pyx_v_sorted_components);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1817, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1817, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1817, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1817, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1817, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_8decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1850
 *             [sorted_components[i] for i in self.encoding_positions]))
 * 
 *   def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream):             # <<<<<<<<<<<<<<
 *     attrs = self._row_column_encoders(dest)
 *     n = len(next(iter(dest.values())))
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_batch_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_dest, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_skip_dispatch) {
  int __pyx_v_i;
  int64_t __pyx_v_nvals;
  size_t __pyx_v_k;
  size_t __pyx_v_n;
  CYTHON_UNUSED PyObject *__pyx_v_null_mask = 0;
  __pyx_t_11apache_beam_6coders_10coder_impl_char_ptr __pyx_v_null_mask_c;
  PyObject *__pyx_v_attrs = NULL;
  int64_t __pyx_v_null_mask_len;
  PyObject *__pyx_v_attr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int64_t __pyx_t_13;
  __pyx_t_11apache_beam_6coders_10coder_impl_char_ptr __pyx_t_14;
  int64_t __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  PyObject *(*__pyx_t_18)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_batch_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_batch_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream)) {
        __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_dest, ((PyObject *)__pyx_v_in_stream)};
          __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, 1850, __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_dest, ((PyObject *)__pyx_v_in_stream)};
          __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, 1850, __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, 1850, __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_dest);
          __Pyx_GIVEREF(__pyx_v_dest);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_dest);
          __Pyx_INCREF(((PyObject *)__pyx_v_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_in_stream));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1851
 * 
 *   def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream):
 *     attrs = self._row_column_encoders(dest)             # <<<<<<<<<<<<<<
 *     n = len(next(iter(dest.values())))
 *     for k in range(n):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_row_column_encoders); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_dest) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_dest);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_attrs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1852
 *   def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream):
 *     attrs = self._row_column_encoders(dest)
 *     n = len(next(iter(dest.values())))             # <<<<<<<<<<<<<<
 *     for k in range(n):
 *       if in_stream.size() == 0:
 */
  if (unlikely(__pyx_v_dest == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
    __PYX_ERR(0, 1852, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_dest); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_7;

  /* "apache_beam/coders/coder_impl.py":1853
 *     attrs = self._row_column_encoders(dest)
 *     n = len(next(iter(dest.values())))
 *     for k in range(n):             # <<<<<<<<<<<<<<
 *       if in_stream.size() == 0:
 *         break
 */
  __pyx_t_8 = __pyx_v_n;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_k = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":1854
 *     n = len(next(iter(dest.values())))
 *     for k in range(n):
 *       if in_stream.size() == 0:             # <<<<<<<<<<<<<<
 *         break
 *       nvals = in_stream.read_var_int64()
 */
    __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->size(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1854, __pyx_L1_error)
    __pyx_t_12 = ((__pyx_t_11 == 0) != 0);
    if (__pyx_t_12) {

      /* "apache_beam/coders/coder_impl.py":1855
 *     for k in range(n):
 *       if in_stream.size() == 0:
 *         break             # <<<<<<<<<<<<<<
 *       nvals = in_stream.read_var_int64()
 *       null_mask_len = in_stream.read_var_int64()
 */
      goto __pyx_L4_break;

      /* "apache_beam/coders/coder_impl.py":1854
 *     n = len(next(iter(dest.values())))
 *     for k in range(n):
 *       if in_stream.size() == 0:             # <<<<<<<<<<<<<<
 *         break
 *       nvals = in_stream.read_var_int64()
 */
    }

    /* "apache_beam/coders/coder_impl.py":1856
 *       if in_stream.size() == 0:
 *         break
 *       nvals = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *       null_mask_len = in_stream.read_var_int64()
 *       if null_mask_len:
 */
    __pyx_t_13 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_13 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1856, __pyx_L1_error)
    __pyx_v_nvals = __pyx_t_13;

    /* "apache_beam/coders/coder_impl.py":1857
 *         break
 *       nvals = in_stream.read_var_int64()
 *       null_mask_len = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *       if null_mask_len:
 *         # pylint: disable=unused-variable
 */
    __pyx_t_13 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_13 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1857, __pyx_L1_error)
    __pyx_v_null_mask_len = __pyx_t_13;

    /* "apache_beam/coders/coder_impl.py":1858
 *       nvals = in_stream.read_var_int64()
 *       null_mask_len = in_stream.read_var_int64()
 *       if null_mask_len:             # <<<<<<<<<<<<<<
 *         # pylint: disable=unused-variable
 *         null_mask_c = null_mask = in_stream.read(null_mask_len)
 */
    __pyx_t_12 = (__pyx_v_null_mask_len != 0);
    if (__pyx_t_12) {

      /* "apache_beam/coders/coder_impl.py":1860
 *       if null_mask_len:
 *         # pylint: disable=unused-variable
 *         null_mask_c = null_mask = in_stream.read(null_mask_len)             # <<<<<<<<<<<<<<
 * 
 *       for i in range(min(self.num_fields, nvals)):
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read(__pyx_v_in_stream, __pyx_v_null_mask_len, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
        __PYX_ERR(0, 1860, __pyx_L1_error)
      }
      __pyx_t_14 = __Pyx_PyBytes_AsWritableString(__pyx_t_1); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 1860, __pyx_L1_error)
      __pyx_v_null_mask_c = __pyx_t_14;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_null_mask, ((PyObject*)__pyx_t_1));
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":1858
 *       nvals = in_stream.read_var_int64()
 *       null_mask_len = in_stream.read_var_int64()
 *       if null_mask_len:             # <<<<<<<<<<<<<<
 *         # pylint: disable=unused-variable
 *         null_mask_c = null_mask = in_stream.read(null_mask_len)
 */
    }

    /* "apache_beam/coders/coder_impl.py":1862
 *         null_mask_c = null_mask = in_stream.read(null_mask_len)
 * 
 *       for i in range(min(self.num_fields, nvals)):             # <<<<<<<<<<<<<<
 *         if not self.encoding_positions_are_trivial:
 *           i = self.encoding_positions_argsort[i]
 */
    __pyx_t_13 = __pyx_v_nvals;
    __pyx_t_5 = __pyx_v_self->num_fields;
    if (((__pyx_t_13 < __pyx_t_5) != 0)) {
      __pyx_t_15 = __pyx_t_13;
    } else {
      __pyx_t_15 = __pyx_t_5;
    }
    __pyx_t_13 = __pyx_t_15;
    __pyx_t_15 = __pyx_t_13;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_15; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "apache_beam/coders/coder_impl.py":1863
 * 
 *       for i in range(min(self.num_fields, nvals)):
 *         if not self.encoding_positions_are_trivial:             # <<<<<<<<<<<<<<
 *           i = self.encoding_positions_argsort[i]
 *         if (null_mask_len and i >> 3 < null_mask_len and
 */
      __pyx_t_12 = ((!(__pyx_v_self->encoding_positions_are_trivial != 0)) != 0);
      if (__pyx_t_12) {

        /* "apache_beam/coders/coder_impl.py":1864
 *       for i in range(min(self.num_fields, nvals)):
 *         if not self.encoding_positions_are_trivial:
 *           i = self.encoding_positions_argsort[i]             # <<<<<<<<<<<<<<
 *         if (null_mask_len and i >> 3 < null_mask_len and
 *             null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 */
        if (unlikely(__pyx_v_self->encoding_positions_argsort == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 1864, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->encoding_positions_argsort, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1864, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1864, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_i = __pyx_t_16;

        /* "apache_beam/coders/coder_impl.py":1863
 * 
 *       for i in range(min(self.num_fields, nvals)):
 *         if not self.encoding_positions_are_trivial:             # <<<<<<<<<<<<<<
 *           i = self.encoding_positions_argsort[i]
 *         if (null_mask_len and i >> 3 < null_mask_len and
 */
      }

      /* "apache_beam/coders/coder_impl.py":1865
 *         if not self.encoding_positions_are_trivial:
 *           i = self.encoding_positions_argsort[i]
 *         if (null_mask_len and i >> 3 < null_mask_len and             # <<<<<<<<<<<<<<
 *             null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 *           continue
 */
      __pyx_t_17 = (__pyx_v_null_mask_len != 0);
      if (__pyx_t_17) {
      } else {
        __pyx_t_12 = __pyx_t_17;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_17 = (((__pyx_v_i >> 3) < __pyx_v_null_mask_len) != 0);
      if (__pyx_t_17) {
      } else {
        __pyx_t_12 = __pyx_t_17;
        goto __pyx_L11_bool_binop_done;
      }

      /* "apache_beam/coders/coder_impl.py":1866
 *           i = self.encoding_positions_argsort[i]
 *         if (null_mask_len and i >> 3 < null_mask_len and
 *             null_mask_c[i >> 3] & (0x01 << (i & 0x07))):             # <<<<<<<<<<<<<<
 *           continue
 *         else:
 */
      __pyx_t_17 = (((__pyx_v_null_mask_c[(__pyx_v_i >> 3)]) & (0x01 << (__pyx_v_i & 0x07))) != 0);
      __pyx_t_12 = __pyx_t_17;
      __pyx_L11_bool_binop_done:;

      /* "apache_beam/coders/coder_impl.py":1865
 *         if not self.encoding_positions_are_trivial:
 *           i = self.encoding_positions_argsort[i]
 *         if (null_mask_len and i >> 3 < null_mask_len and             # <<<<<<<<<<<<<<
 *             null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 *           continue
 */
      if (__pyx_t_12) {

        /* "apache_beam/coders/coder_impl.py":1867
 *         if (null_mask_len and i >> 3 < null_mask_len and
 *             null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 *           continue             # <<<<<<<<<<<<<<
 *         else:
 *           cython.cast(RowColumnEncoder,
 */
        goto __pyx_L7_continue;

        /* "apache_beam/coders/coder_impl.py":1865
 *         if not self.encoding_positions_are_trivial:
 *           i = self.encoding_positions_argsort[i]
 *         if (null_mask_len and i >> 3 < null_mask_len and             # <<<<<<<<<<<<<<
 *             null_mask_c[i >> 3] & (0x01 << (i & 0x07))):
 *           continue
 */
      }

      /* "apache_beam/coders/coder_impl.py":1870
 *         else:
 *           cython.cast(RowColumnEncoder,
 *                       attrs[i]).decode_from_stream(k, in_stream)             # <<<<<<<<<<<<<<
 *     else:
 *       # Loop variable will be n-1 on normal exit.
 */
      /*else*/ {
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_attrs, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1870, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "apache_beam/coders/coder_impl.py":1869
 *           continue
 *         else:
 *           cython.cast(RowColumnEncoder,             # <<<<<<<<<<<<<<
 *                       attrs[i]).decode_from_stream(k, in_stream)
 *     else:
 */
        __pyx_t_12 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_t_1)->__pyx_vtab)->decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_t_1), __pyx_v_k, __pyx_v_in_stream); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1870, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L7_continue:;
    }
  }
  /*else*/ {

    /* "apache_beam/coders/coder_impl.py":1873
 *     else:
 *       # Loop variable will be n-1 on normal exit.
 *       k = n             # <<<<<<<<<<<<<<
 * 
 *     for attr in attrs:
 */
    __pyx_v_k = __pyx_v_n;
  }
  __pyx_L4_break:;

  /* "apache_beam/coders/coder_impl.py":1875
 *       k = n
 * 
 *     for attr in attrs:             # <<<<<<<<<<<<<<
 *       attr.finalize_write()
 *     return k
 */
  if (likely(PyList_CheckExact(__pyx_v_attrs)) || PyTuple_CheckExact(__pyx_v_attrs)) {
    __pyx_t_1 = __pyx_v_attrs; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
    __pyx_t_18 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_attrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_18 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1875, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_18)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1875, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1875, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_18(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1875, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":1876
 * 
 *     for attr in attrs:
 *       attr.finalize_write()             # <<<<<<<<<<<<<<
 *     return k
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_n_s_finalize_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":1875
 *       k = n
 * 
 *     for attr in attrs:             # <<<<<<<<<<<<<<
 *       attr.finalize_write()
 *     return k
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1877
 *     for attr in attrs:
 *       attr.finalize_write()
 *     return k             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_k); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1850
 *             [sorted_components[i] for i in self.encoding_positions]))
 * 
 *   def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream):             # <<<<<<<<<<<<<<
 *     attrs = self._row_column_encoders(dest)
 *     n = len(next(iter(dest.values())))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_batch_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_null_mask);
  __Pyx_XDECREF(__pyx_v_attrs);
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream = {"decode_batch_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dest = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_batch_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dest,&__pyx_n_s_in_stream,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_dest)) != 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_in_stream)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_batch_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1850, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_batch_from_stream") < 0)) __PYX_ERR(0, 1850, __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_dest = ((PyObject*)values[0]);
    __pyx_v_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_batch_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1850, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_batch_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dest), (&PyDict_Type), 1, "dest", 1))) __PYX_ERR(0, 1850, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1850, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_10decode_batch_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), __pyx_v_dest, __pyx_v_in_stream);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_10decode_batch_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v_dest, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_batch_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_batch_from_stream(__pyx_v_self, __pyx_v_dest, __pyx_v_in_stream, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.decode_batch_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_12__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.components, self.constructor, self.encoding_positions, self.encoding_positions_are_trivial, self.encoding_positions_argsort, self.field_names, self.field_nullable, self.has_nullable_fields, self.num_fields, self.schema)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->encoding_positions_are_trivial); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->has_nullable_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->num_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->components);
  __Pyx_GIVEREF(__pyx_v_self->components);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->components);
  __Pyx_INCREF(__pyx_v_self->constructor);
  __Pyx_GIVEREF(__pyx_v_self->constructor);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->constructor);
  __Pyx_INCREF(__pyx_v_self->encoding_positions);
  __Pyx_GIVEREF(__pyx_v_self->encoding_positions);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_self->encoding_positions);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->encoding_positions_argsort);
  __Pyx_GIVEREF(__pyx_v_self->encoding_positions_argsort);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->encoding_positions_argsort);
  __Pyx_INCREF(__pyx_v_self->field_names);
  __Pyx_GIVEREF(__pyx_v_self->field_names);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->field_names);
  __Pyx_INCREF(__pyx_v_self->field_nullable);
  __Pyx_GIVEREF(__pyx_v_self->field_nullable);
  PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_self->field_nullable);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 7, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->schema);
  __Pyx_GIVEREF(__pyx_v_self->schema);
  PyTuple_SET_ITEM(__pyx_t_4, 9, __pyx_v_self->schema);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.components, self.constructor, self.encoding_positions, self.encoding_positions_are_trivial, self.encoding_positions_argsort, self.field_names, self.field_nullable, self.has_nullable_fields, self.num_fields, self.schema)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v__dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":7
 *     state = (self.components, self.constructor, self.encoding_positions, self.encoding_positions_are_trivial, self.encoding_positions_argsort, self.field_names, self.field_nullable, self.has_nullable_fields, self.num_fields, self.schema)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         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)":8
 *     _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(1, 8, __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(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.components, self.constructor, self.encoding_positions, self.encoding_positions_are_trivial, self.encoding_positions_argsort, self.field_names, self.field_nullable, self.has_nullable_fields, self.num_fields, self.schema)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->components != ((PyObject*)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->constructor != 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->encoding_positions != ((PyObject*)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->encoding_positions_argsort != ((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->field_names != ((PyObject*)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->field_nullable != ((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->schema != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_6;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, None), state
 *     else:
 */
  __pyx_t_6 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":13
 *         use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None
 *     if use_setstate:
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_RowCoderImpl); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_12649985);
    __Pyx_GIVEREF(__pyx_int_12649985);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_12649985);
    __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(1, 13, __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)":12
 *     else:
 *         use_setstate = self.components is not None or self.constructor is not None or self.encoding_positions is not None or self.encoding_positions_argsort is not None or self.field_names is not None or self.field_nullable is not None or self.schema is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, None), state
 *     else:
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_RowCoderImpl); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_12649985);
    __Pyx_GIVEREF(__pyx_int_12649985);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_12649985);
    __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(1, 15, __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 tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_14__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_12RowCoderImpl_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.RowCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1881
 * 
 * class LogicalTypeCoderImpl(StreamCoderImpl):
 *   def __init__(self, logical_type, representation_coder):             # <<<<<<<<<<<<<<
 *     self.logical_type = logical_type
 *     self.representation_coder = representation_coder.get_impl()
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_logical_type = 0;
  PyObject *__pyx_v_representation_coder = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_logical_type,&__pyx_n_s_representation_coder,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_logical_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_representation_coder)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1881, __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, 1881, __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_logical_type = values[0];
    __pyx_v_representation_coder = 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, 1881, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self), __pyx_v_logical_type, __pyx_v_representation_coder);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_logical_type, PyObject *__pyx_v_representation_coder) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":1882
 * class LogicalTypeCoderImpl(StreamCoderImpl):
 *   def __init__(self, logical_type, representation_coder):
 *     self.logical_type = logical_type             # <<<<<<<<<<<<<<
 *     self.representation_coder = representation_coder.get_impl()
 * 
 */
  __Pyx_INCREF(__pyx_v_logical_type);
  __Pyx_GIVEREF(__pyx_v_logical_type);
  __Pyx_GOTREF(__pyx_v_self->logical_type);
  __Pyx_DECREF(__pyx_v_self->logical_type);
  __pyx_v_self->logical_type = __pyx_v_logical_type;

  /* "apache_beam/coders/coder_impl.py":1883
 *   def __init__(self, logical_type, representation_coder):
 *     self.logical_type = logical_type
 *     self.representation_coder = representation_coder.get_impl()             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_representation_coder, __pyx_n_s_get_impl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1883, __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_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 1883, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->representation_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->representation_coder));
  __pyx_v_self->representation_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1881
 * 
 * class LogicalTypeCoderImpl(StreamCoderImpl):
 *   def __init__(self, logical_type, representation_coder):             # <<<<<<<<<<<<<<
 *     self.logical_type = logical_type
 *     self.representation_coder = representation_coder.get_impl()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1885
 *     self.representation_coder = representation_coder.get_impl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     return self.representation_coder.encode_to_stream(
 *         self.logical_type.to_representation_type(value), out, nested)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1885, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1885, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1885, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1885, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1886
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     return self.representation_coder.encode_to_stream(             # <<<<<<<<<<<<<<
 *         self.logical_type.to_representation_type(value), out, nested)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":1887
 *   def encode_to_stream(self, value, out, nested):
 *     return self.representation_coder.encode_to_stream(
 *         self.logical_type.to_representation_type(value), out, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->logical_type, __pyx_n_s_to_representation_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1886
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     return self.representation_coder.encode_to_stream(             # <<<<<<<<<<<<<<
 *         self.logical_type.to_representation_type(value), out, nested)
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->representation_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->representation_coder, __pyx_t_1, __pyx_v_out, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1885
 *     self.representation_coder = representation_coder.get_impl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     return self.representation_coder.encode_to_stream(
 *         self.logical_type.to_representation_type(value), out, nested)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1885, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1885, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1885, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1885, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1885, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1885, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1889
 *         self.logical_type.to_representation_type(value), out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return self.logical_type.to_language_type(
 *         self.representation_coder.decode_from_stream(in_stream, nested))
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1889, __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_in_stream), __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, 1889, __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_in_stream), __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, 1889, __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, 1889, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1889, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1890
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     return self.logical_type.to_language_type(             # <<<<<<<<<<<<<<
 *         self.representation_coder.decode_from_stream(in_stream, nested))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->logical_type, __pyx_n_s_to_language_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/coders/coder_impl.py":1891
 *   def decode_from_stream(self, in_stream, nested):
 *     return self.logical_type.to_language_type(
 *         self.representation_coder.decode_from_stream(in_stream, nested))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->representation_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->representation_coder, __pyx_v_in_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(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_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1889
 *         self.logical_type.to_representation_type(value), out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return self.logical_type.to_language_type(
 *         self.representation_coder.decode_from_stream(in_stream, nested))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1889, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1889, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1889, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1889, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1889, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_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_6coders_10coder_impl_20LogicalTypeCoderImpl_6__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_6__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.logical_type, self.representation_coder)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->logical_type);
  __Pyx_GIVEREF(__pyx_v_self->logical_type);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->logical_type);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->representation_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->representation_coder));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->representation_coder));
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.logical_type, self.representation_coder)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.logical_type, self.representation_coder)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.logical_type is not None or self.representation_coder is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.logical_type, self.representation_coder)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.logical_type is not None or self.representation_coder is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->logical_type != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->representation_coder) != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.logical_type is not None or self.representation_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.logical_type is not None or self.representation_coder is not None
 *     if use_setstate:
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LogicalTypeCoderI); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_17783873);
    __Pyx_GIVEREF(__pyx_int_17783873);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_17783873);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.logical_type is not None or self.representation_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, None), state
 *     else:
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_LogicalTypeCoderI); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_17783873);
    __Pyx_GIVEREF(__pyx_int_17783873);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_17783873);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_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_6coders_10coder_impl_20LogicalTypeCoderImpl_8__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_8__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LogicalTypeCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1899
 *   For interoperability with Java SDK, encoding needs to match that of the Java
 *   SDK BigIntegerCoder."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     if value < 0:
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_byte_length = NULL;
  PyObject *__pyx_v_encoded_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1899, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1899, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1899, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1899, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1899, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1901
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (int, create_OutputStream, bool) -> None
 *     if value < 0:             # <<<<<<<<<<<<<<
 *       byte_length = ((value + 1).bit_length() + 8) // 8
 *     else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":1902
 *     # type: (int, create_OutputStream, bool) -> None
 *     if value < 0:
 *       byte_length = ((value + 1).bit_length() + 8) // 8             # <<<<<<<<<<<<<<
 *     else:
 *       byte_length = (value.bit_length() + 8) // 8
 */
    __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_value, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bit_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_4, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_byte_length = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":1901
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (int, create_OutputStream, bool) -> None
 *     if value < 0:             # <<<<<<<<<<<<<<
 *       byte_length = ((value + 1).bit_length() + 8) // 8
 *     else:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":1904
 *       byte_length = ((value + 1).bit_length() + 8) // 8
 *     else:
 *       byte_length = (value.bit_length() + 8) // 8             # <<<<<<<<<<<<<<
 *     encoded_value = value.to_bytes(
 *         length=byte_length, byteorder='big', signed=True)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_bit_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_4, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_byte_length = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":1905
 *     else:
 *       byte_length = (value.bit_length() + 8) // 8
 *     encoded_value = value.to_bytes(             # <<<<<<<<<<<<<<
 *         length=byte_length, byteorder='big', signed=True)
 *     out.write(encoded_value, nested)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_to_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/coders/coder_impl.py":1906
 *       byte_length = (value.bit_length() + 8) // 8
 *     encoded_value = value.to_bytes(
 *         length=byte_length, byteorder='big', signed=True)             # <<<<<<<<<<<<<<
 *     out.write(encoded_value, nested)
 * 
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_length, __pyx_v_byte_length) < 0) __PYX_ERR(0, 1906, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_byteorder, __pyx_n_u_big) < 0) __PYX_ERR(0, 1906, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_signed, Py_True) < 0) __PYX_ERR(0, 1906, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1905
 *     else:
 *       byte_length = (value.bit_length() + 8) // 8
 *     encoded_value = value.to_bytes(             # <<<<<<<<<<<<<<
 *         length=byte_length, byteorder='big', signed=True)
 *     out.write(encoded_value, nested)
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_encoded_value = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1907
 *     encoded_value = value.to_bytes(
 *         length=byte_length, byteorder='big', signed=True)
 *     out.write(encoded_value, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_encoded_value))||((__pyx_v_encoded_value) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_encoded_value)->tp_name), 0))) __PYX_ERR(0, 1907, __pyx_L1_error)
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.nested = __pyx_v_nested;
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_v_encoded_value), 0, &__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1899
 *   For interoperability with Java SDK, encoding needs to match that of the Java
 *   SDK BigIntegerCoder."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     if value < 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byte_length);
  __Pyx_XDECREF(__pyx_v_encoded_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1899, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1899, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1899, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1899, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1899, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1899, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1909
 *     out.write(encoded_value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> int
 *     encoded_value = in_stream.read_all(nested)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_encoded_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_11InputStream_read_all __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __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_in_stream), __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, 1909, __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_in_stream), __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, 1909, __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, 1909, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1909, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1911
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> int
 *     encoded_value = in_stream.read_all(nested)             # <<<<<<<<<<<<<<
 *     return int.from_bytes(encoded_value, byteorder='big', signed=True)
 * 
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.nested = __pyx_v_nested;
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_all(__pyx_v_in_stream, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_encoded_value = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1912
 *     # type: (create_InputStream, bool) -> int
 *     encoded_value = in_stream.read_all(nested)
 *     return int.from_bytes(encoded_value, byteorder='big', signed=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyInt_Type)), __pyx_n_s_from_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_encoded_value);
  __Pyx_GIVEREF(__pyx_v_encoded_value);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_encoded_value);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_byteorder, __pyx_n_u_big) < 0) __PYX_ERR(0, 1912, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_signed, Py_True) < 0) __PYX_ERR(0, 1912, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1912, __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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1909
 *     out.write(encoded_value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> int
 *     encoded_value = in_stream.read_all(nested)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encoded_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1909, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1909, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1909, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1909, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1909, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BigIntegerCoderIm); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_BigIntegerCoderIm); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.BigIntegerCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1923
 *   BIG_INT_CODER_IMPL = BigIntegerCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (decimal.Decimal, create_OutputStream, bool) -> None
 *     scale = -value.as_tuple().exponent
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_scale = NULL;
  PyObject *__pyx_v_int_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int64_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1923, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1923, __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[4] = {__pyx_t_5, __pyx_v_value, ((PyObject *)__pyx_v_out), __pyx_t_3};
          __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, 1923, __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(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1923, __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_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_value);
          __Pyx_INCREF(((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 2+__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, 1923, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1925
 *   def encode_to_stream(self, value, out, nested):
 *     # type: (decimal.Decimal, create_OutputStream, bool) -> None
 *     scale = -value.as_tuple().exponent             # <<<<<<<<<<<<<<
 *     int_value = int(value.scaleb(scale))
 *     out.write_var_int64(scale)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_as_tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_exponent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_scale = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1926
 *     # type: (decimal.Decimal, create_OutputStream, bool) -> None
 *     scale = -value.as_tuple().exponent
 *     int_value = int(value.scaleb(scale))             # <<<<<<<<<<<<<<
 *     out.write_var_int64(scale)
 *     self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_scaleb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_scale) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_scale);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_int_value = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1927
 *     scale = -value.as_tuple().exponent
 *     int_value = int(value.scaleb(scale))
 *     out.write_var_int64(scale)             # <<<<<<<<<<<<<<
 *     self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested)
 * 
 */
  __pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_v_scale); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1927, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1928
 *     int_value = int(value.scaleb(scale))
 *     out.write_var_int64(scale)
 *     self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_BIG_INT_CODER_IMPL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __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_7, __pyx_v_int_value, ((PyObject *)__pyx_v_out), __pyx_t_1};
    __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, 1928, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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_4)) {
    PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_int_value, ((PyObject *)__pyx_v_out), __pyx_t_1};
    __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, 1928, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_int_value);
    __Pyx_GIVEREF(__pyx_v_int_value);
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_int_value);
    __Pyx_INCREF(((PyObject *)__pyx_v_out));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, ((PyObject *)__pyx_v_out));
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1923
 *   BIG_INT_CODER_IMPL = BigIntegerCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (decimal.Decimal, create_OutputStream, bool) -> None
 *     scale = -value.as_tuple().exponent
 */

  /* function exit code */
  __pyx_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.coders.coder_impl.DecimalCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_scale);
  __Pyx_XDECREF(__pyx_v_int_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream = {"encode_to_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("encode_to_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_out,&__pyx_n_s_nested,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_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 1); __PYX_ERR(0, 1923, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, 2); __PYX_ERR(0, 1923, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "encode_to_stream") < 0)) __PYX_ERR(0, 1923, __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_value = values[0];
    __pyx_v_out = ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)values[1]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1923, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("encode_to_stream", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1923, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_11apache_beam_6coders_6stream_OutputStream, 1, "out", 0))) __PYX_ERR(0, 1923, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v_self), __pyx_v_value, __pyx_v_out, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_out, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":1930
 *     self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> decimal.Decimal
 *     scale = in_stream.read_var_int64()
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_scale = NULL;
  PyObject *__pyx_v_int_value = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int64_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1930, __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_in_stream), __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, 1930, __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_in_stream), __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, 1930, __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, 1930, __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_in_stream));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
          __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, 1930, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "apache_beam/coders/coder_impl.py":1932
 *   def decode_from_stream(self, in_stream, nested):
 *     # type: (create_InputStream, bool) -> decimal.Decimal
 *     scale = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *     int_value = self.BIG_INT_CODER_IMPL.decode_from_stream(in_stream, nested)
 *     value = decimal.Decimal(int_value).scaleb(-scale)
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_8 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 1932, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_scale = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1933
 *     # type: (create_InputStream, bool) -> decimal.Decimal
 *     scale = in_stream.read_var_int64()
 *     int_value = self.BIG_INT_CODER_IMPL.decode_from_stream(in_stream, nested)             # <<<<<<<<<<<<<<
 *     value = decimal.Decimal(int_value).scaleb(-scale)
 *     return value
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_BIG_INT_CODER_IMPL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __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_7, ((PyObject *)__pyx_v_in_stream), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, ((PyObject *)__pyx_v_in_stream), __pyx_t_2};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_in_stream));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_in_stream));
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, ((PyObject *)__pyx_v_in_stream));
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_int_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1934
 *     scale = in_stream.read_var_int64()
 *     int_value = self.BIG_INT_CODER_IMPL.decode_from_stream(in_stream, nested)
 *     value = decimal.Decimal(int_value).scaleb(-scale)             # <<<<<<<<<<<<<<
 *     return value
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_decimal); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_int_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_int_value);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_scaleb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Negative(__pyx_v_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1935
 *     int_value = self.BIG_INT_CODER_IMPL.decode_from_stream(in_stream, nested)
 *     value = decimal.Decimal(int_value).scaleb(-scale)
 *     return value             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_value);
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":1930
 *     self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> decimal.Decimal
 *     scale = in_stream.read_var_int64()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_scale);
  __Pyx_XDECREF(__pyx_v_int_value);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream = {"decode_from_stream", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream = 0;
  int __pyx_v_nested;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decode_from_stream (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_stream,&__pyx_n_s_nested,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_in_stream)) != 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_nested)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, 1); __PYX_ERR(0, 1930, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decode_from_stream") < 0)) __PYX_ERR(0, 1930, __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_in_stream = ((struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *)values[0]);
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1930, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1930, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_stream), __pyx_ptype_11apache_beam_6coders_6stream_InputStream, 1, "in_stream", 0))) __PYX_ERR(0, 1930, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_2decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v_self), __pyx_v_in_stream, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_2decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, int __pyx_v_nested) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_in_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_4__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_4__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_DecimalCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_DecimalCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_6__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_6__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DecimalCoderImpl.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_7__pyx_unpickle_CoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_7__pyx_unpickle_CoderImpl = {"__pyx_unpickle_CoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_7__pyx_unpickle_CoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_7__pyx_unpickle_CoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CoderImpl (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_CoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_6__pyx_unpickle_CoderImpl(__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_6coders_10coder_impl_6__pyx_unpickle_CoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = CoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = CoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CoderImpl__set_state(<CoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = CoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CoderImpl__set_state(<CoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = CoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CoderImpl__set_state(<CoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = CoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CoderImpl__set_state(<CoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CoderImpl__set_state(<CoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_CoderImpl__set_state(<CoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CoderImpl__set_state(<CoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_SimpleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_SimpleCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_SimpleCoderImpl = {"__pyx_unpickle_SimpleCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_SimpleCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_SimpleCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleCoderImpl (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_SimpleCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SimpleCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SimpleCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SimpleCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_8__pyx_unpickle_SimpleCoderImpl(__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_6coders_10coder_impl_8__pyx_unpickle_SimpleCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = SimpleCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SimpleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = SimpleCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SimpleCoderImpl__set_state(<SimpleCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = SimpleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SimpleCoderImpl__set_state(<SimpleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = SimpleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SimpleCoderImpl__set_state(<SimpleCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SimpleCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = SimpleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SimpleCoderImpl__set_state(<SimpleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SimpleCoderImpl__set_state(<SimpleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SimpleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SimpleCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_SimpleCoderImpl__set_state(<SimpleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SimpleCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_SimpleCoderImpl__set_state(<SimpleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SimpleCoderImpl__set_state(SimpleCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SimpleCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_11__pyx_unpickle_StreamCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_11__pyx_unpickle_StreamCoderImpl = {"__pyx_unpickle_StreamCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_11__pyx_unpickle_StreamCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_11__pyx_unpickle_StreamCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_StreamCoderImpl (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_StreamCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StreamCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_StreamCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_StreamCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_StreamCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_10__pyx_unpickle_StreamCoderImpl(__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_6coders_10coder_impl_10__pyx_unpickle_StreamCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StreamCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = StreamCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = StreamCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = StreamCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StreamCoderImpl__set_state(<StreamCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = StreamCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StreamCoderImpl__set_state(<StreamCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = StreamCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StreamCoderImpl__set_state(<StreamCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_StreamCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = StreamCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_StreamCoderImpl__set_state(<StreamCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_StreamCoderImpl__set_state(<StreamCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_StreamCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_StreamCoderImpl__set_state(<StreamCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_StreamCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StreamCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_StreamCoderImpl__set_state(<StreamCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_StreamCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_CallbackCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13__pyx_unpickle_CallbackCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13__pyx_unpickle_CallbackCoderImpl = {"__pyx_unpickle_CallbackCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_13__pyx_unpickle_CallbackCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13__pyx_unpickle_CallbackCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_CallbackCoderImpl (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_CallbackCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CallbackCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_CallbackCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_CallbackCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CallbackCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_12__pyx_unpickle_CallbackCoderImpl(__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_6coders_10coder_impl_12__pyx_unpickle_CallbackCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CallbackCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd79bc1f, 0x86660dc, 0xa4a2c07):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd79bc1f, 0x86660dc, 0xa4a2c07) = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__16, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd79bc1f, 0x86660dc, 0xa4a2c07):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd79bc1f, 0x86660dc, 0xa4a2c07) = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)
 *     __pyx_result = CallbackCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd79bc1f, 0x86660dc, 0xa4a2c07):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd79bc1f, 0x86660dc, 0xa4a2c07) = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CallbackCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd79bc1f, 0x86660dc, 0xa4a2c07):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd79bc1f, 0x86660dc, 0xa4a2c07) = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd79bc1f, 0x86660dc, 0xa4a2c07) = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)
 *     __pyx_result = CallbackCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CallbackCoderImpl__set_state(<CallbackCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd79bc1f, 0x86660dc, 0xa4a2c07) = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)
 *     __pyx_result = CallbackCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CallbackCoderImpl__set_state(<CallbackCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = CallbackCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CallbackCoderImpl__set_state(<CallbackCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CallbackCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd79bc1f, 0x86660dc, 0xa4a2c07) = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)
 *     __pyx_result = CallbackCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_CallbackCoderImpl__set_state(<CallbackCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_CallbackCoderImpl__set_state(<CallbackCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CallbackCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CallbackCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_CallbackCoderImpl__set_state(<CallbackCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_CallbackCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CallbackCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_decoder);
  __Pyx_DECREF(__pyx_v___pyx_result->_decoder);
  __pyx_v___pyx_result->_decoder = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_encoder);
  __Pyx_DECREF(__pyx_v___pyx_result->_encoder);
  __pyx_v___pyx_result->_encoder = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_size_estimator);
  __Pyx_DECREF(__pyx_v___pyx_result->_size_estimator);
  __pyx_v___pyx_result->_size_estimator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 3) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_CallbackCoderImpl__set_state(<CallbackCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CallbackCoderImpl__set_state(CallbackCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._decoder = __pyx_state[0]; __pyx_result._encoder = __pyx_state[1]; __pyx_result._size_estimator = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_CallbackCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_FastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_FastPrimitivesCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_FastPrimitivesCoderImpl = {"__pyx_unpickle_FastPrimitivesCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_FastPrimitivesCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_FastPrimitivesCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_FastPrimitivesCoderImpl (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_FastPrimitivesCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FastPrimitivesCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_FastPrimitivesCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FastPrimitivesCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FastPrimitivesCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_14__pyx_unpickle_FastPrimitivesCoderImpl(__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_6coders_10coder_impl_14__pyx_unpickle_FastPrimitivesCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FastPrimitivesCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x22c2424, 0x0a1844e, 0x621d470):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x22c2424, 0x0a1844e, 0x621d470) = (fallback_coder_impl, iterable_coder_impl, requires_deterministic_step_label, warn_deterministic_fallback))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__17, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x22c2424, 0x0a1844e, 0x621d470):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x22c2424, 0x0a1844e, 0x621d470) = (fallback_coder_impl, iterable_coder_impl, requires_deterministic_step_label, warn_deterministic_fallback))" % __pyx_checksum)
 *     __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x22c2424, 0x0a1844e, 0x621d470):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x22c2424, 0x0a1844e, 0x621d470) = (fallback_coder_impl, iterable_coder_impl, requires_deterministic_step_label, warn_deterministic_fallback))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x22c2424, 0x0a1844e, 0x621d470):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x22c2424, 0x0a1844e, 0x621d470) = (fallback_coder_impl, iterable_coder_impl, requires_deterministic_step_label, warn_deterministic_fallback))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x22c2424, 0x0a1844e, 0x621d470) = (fallback_coder_impl, iterable_coder_impl, requires_deterministic_step_label, warn_deterministic_fallback))" % __pyx_checksum)
 *     __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FastPrimitivesCoderImpl__set_state(<FastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x22c2424, 0x0a1844e, 0x621d470) = (fallback_coder_impl, iterable_coder_impl, requires_deterministic_step_label, warn_deterministic_fallback))" % __pyx_checksum)
 *     __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FastPrimitivesCoderImpl__set_state(<FastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FastPrimitivesCoderImpl__set_state(<FastPrimitivesCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FastPrimitivesCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x22c2424, 0x0a1844e, 0x621d470) = (fallback_coder_impl, iterable_coder_impl, requires_deterministic_step_label, warn_deterministic_fallback))" % __pyx_checksum)
 *     __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FastPrimitivesCoderImpl__set_state(<FastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FastPrimitivesCoderImpl__set_state(<FastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.iterable_coder_impl = __pyx_state[1]; __pyx_result.requires_deterministic_step_label = __pyx_state[2]; __pyx_result.warn_deterministic_fallback = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FastPrimitivesCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_FastPrimitivesCoderImpl__set_state(<FastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.iterable_coder_impl = __pyx_state[1]; __pyx_result.requires_deterministic_step_label = __pyx_state[2]; __pyx_result.warn_deterministic_fallback = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FastPrimitivesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FastPrimitivesCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.iterable_coder_impl = __pyx_state[1]; __pyx_result.requires_deterministic_step_label = __pyx_state[2]; __pyx_result.warn_deterministic_fallback = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->fallback_coder_impl);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->fallback_coder_impl));
  __pyx_v___pyx_result->fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->iterable_coder_impl);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->iterable_coder_impl));
  __pyx_v___pyx_result->iterable_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->requires_deterministic_step_label);
  __Pyx_DECREF(__pyx_v___pyx_result->requires_deterministic_step_label);
  __pyx_v___pyx_result->requires_deterministic_step_label = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->warn_deterministic_fallback = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.iterable_coder_impl = __pyx_state[1]; __pyx_result.requires_deterministic_step_label = __pyx_state[2]; __pyx_result.warn_deterministic_fallback = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.iterable_coder_impl = __pyx_state[1]; __pyx_result.requires_deterministic_step_label = __pyx_state[2]; __pyx_result.warn_deterministic_fallback = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.iterable_coder_impl = __pyx_state[1]; __pyx_result.requires_deterministic_step_label = __pyx_state[2]; __pyx_result.warn_deterministic_fallback = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_FastPrimitivesCoderImpl__set_state(<FastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.iterable_coder_impl = __pyx_state[1]; __pyx_result.requires_deterministic_step_label = __pyx_state[2]; __pyx_result.warn_deterministic_fallback = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FastPrimitivesCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BytesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_BytesCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_BytesCoderImpl = {"__pyx_unpickle_BytesCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_BytesCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_BytesCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BytesCoderImpl (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_BytesCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BytesCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BytesCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BytesCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BytesCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_16__pyx_unpickle_BytesCoderImpl(__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_6coders_10coder_impl_16__pyx_unpickle_BytesCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BytesCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BytesCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = BytesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BytesCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BytesCoderImpl__set_state(<BytesCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BytesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BytesCoderImpl__set_state(<BytesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = BytesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BytesCoderImpl__set_state(<BytesCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BytesCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BytesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BytesCoderImpl__set_state(<BytesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BytesCoderImpl__set_state(<BytesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BytesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BytesCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BytesCoderImpl__set_state(<BytesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BytesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BytesCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BytesCoderImpl__set_state(<BytesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BytesCoderImpl__set_state(BytesCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BytesCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BooleanCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_BooleanCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_BooleanCoderImpl = {"__pyx_unpickle_BooleanCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_BooleanCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_BooleanCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BooleanCoderImpl (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_BooleanCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BooleanCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BooleanCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BooleanCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BooleanCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_18__pyx_unpickle_BooleanCoderImpl(__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_6coders_10coder_impl_18__pyx_unpickle_BooleanCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BooleanCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BooleanCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = BooleanCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BooleanCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BooleanCoderImpl__set_state(<BooleanCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BooleanCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BooleanCoderImpl__set_state(<BooleanCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = BooleanCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BooleanCoderImpl__set_state(<BooleanCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BooleanCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BooleanCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BooleanCoderImpl__set_state(<BooleanCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BooleanCoderImpl__set_state(<BooleanCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BooleanCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BooleanCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BooleanCoderImpl__set_state(<BooleanCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BooleanCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BooleanCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BooleanCoderImpl__set_state(<BooleanCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BooleanCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_MapCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_MapCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_MapCoderImpl = {"__pyx_unpickle_MapCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_MapCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_MapCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_MapCoderImpl (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_MapCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MapCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_MapCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_MapCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_MapCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_20__pyx_unpickle_MapCoderImpl(__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_6coders_10coder_impl_20__pyx_unpickle_MapCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_MapCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x00bc84d, 0x3172254, 0xa5c3328):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x00bc84d, 0x3172254, 0xa5c3328) = (_is_deterministic, _key_coder, _value_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__18, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x00bc84d, 0x3172254, 0xa5c3328):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x00bc84d, 0x3172254, 0xa5c3328) = (_is_deterministic, _key_coder, _value_coder))" % __pyx_checksum)
 *     __pyx_result = MapCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x00bc84d, 0x3172254, 0xa5c3328):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x00bc84d, 0x3172254, 0xa5c3328) = (_is_deterministic, _key_coder, _value_coder))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = MapCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x00bc84d, 0x3172254, 0xa5c3328):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x00bc84d, 0x3172254, 0xa5c3328) = (_is_deterministic, _key_coder, _value_coder))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x00bc84d, 0x3172254, 0xa5c3328) = (_is_deterministic, _key_coder, _value_coder))" % __pyx_checksum)
 *     __pyx_result = MapCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MapCoderImpl__set_state(<MapCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x00bc84d, 0x3172254, 0xa5c3328) = (_is_deterministic, _key_coder, _value_coder))" % __pyx_checksum)
 *     __pyx_result = MapCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MapCoderImpl__set_state(<MapCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = MapCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MapCoderImpl__set_state(<MapCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_MapCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x00bc84d, 0x3172254, 0xa5c3328) = (_is_deterministic, _key_coder, _value_coder))" % __pyx_checksum)
 *     __pyx_result = MapCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_MapCoderImpl__set_state(<MapCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_MapCoderImpl__set_state(<MapCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_MapCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_MapCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_MapCoderImpl__set_state(<MapCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_MapCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_MapCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_is_deterministic = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_key_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_key_coder));
  __pyx_v___pyx_result->_key_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_value_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_value_coder));
  __pyx_v___pyx_result->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 3) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[3])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[3])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_MapCoderImpl__set_state(<MapCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_MapCoderImpl__set_state(MapCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._is_deterministic = __pyx_state[0]; __pyx_result._key_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]
 *     if len(__pyx_state) > 3 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_MapCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BigEndianShortCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_BigEndianShortCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_BigEndianShortCoderImpl = {"__pyx_unpickle_BigEndianShortCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_BigEndianShortCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_BigEndianShortCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BigEndianShortCoderImpl (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_BigEndianShortCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BigEndianShortCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BigEndianShortCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BigEndianShortCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigEndianShortCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22__pyx_unpickle_BigEndianShortCoderImpl(__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_6coders_10coder_impl_22__pyx_unpickle_BigEndianShortCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BigEndianShortCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BigEndianShortCoderImpl__set_state(<BigEndianShortCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BigEndianShortCoderImpl__set_state(<BigEndianShortCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BigEndianShortCoderImpl__set_state(<BigEndianShortCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigEndianShortCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BigEndianShortCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BigEndianShortCoderImpl__set_state(<BigEndianShortCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BigEndianShortCoderImpl__set_state(<BigEndianShortCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BigEndianShortCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigEndianShortCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BigEndianShortCoderImpl__set_state(<BigEndianShortCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigEndianShortCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BigEndianShortCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BigEndianShortCoderImpl__set_state(<BigEndianShortCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigEndianShortCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_SinglePrecisionFloatCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_SinglePrecisionFloatCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_SinglePrecisionFloatCoderImpl = {"__pyx_unpickle_SinglePrecisionFloatCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_SinglePrecisionFloatCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_SinglePrecisionFloatCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_SinglePrecisionFloatCoderImpl (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_SinglePrecisionFloatCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SinglePrecisionFloatCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SinglePrecisionFloatCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SinglePrecisionFloatCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SinglePrecisionFloatCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_24__pyx_unpickle_SinglePrecisionFloatCoderImpl(__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_6coders_10coder_impl_24__pyx_unpickle_SinglePrecisionFloatCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SinglePrecisionFloatCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(<SinglePrecisionFloatCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(<SinglePrecisionFloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(<SinglePrecisionFloatCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = SinglePrecisionFloatCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(<SinglePrecisionFloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(<SinglePrecisionFloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SinglePrecisionFloatCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SinglePrecisionFloatCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(<SinglePrecisionFloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(<SinglePrecisionFloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(SinglePrecisionFloatCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_FloatCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_FloatCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_FloatCoderImpl = {"__pyx_unpickle_FloatCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_FloatCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_FloatCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatCoderImpl (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_FloatCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_FloatCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FloatCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FloatCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_26__pyx_unpickle_FloatCoderImpl(__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_6coders_10coder_impl_26__pyx_unpickle_FloatCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = FloatCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = FloatCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = FloatCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatCoderImpl__set_state(<FloatCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = FloatCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatCoderImpl__set_state(<FloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = FloatCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatCoderImpl__set_state(<FloatCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FloatCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = FloatCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_FloatCoderImpl__set_state(<FloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_FloatCoderImpl__set_state(<FloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FloatCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FloatCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_FloatCoderImpl__set_state(<FloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_FloatCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_FloatCoderImpl__set_state(<FloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_FloatCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IntervalWindowCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_IntervalWindowCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_IntervalWindowCoderImpl = {"__pyx_unpickle_IntervalWindowCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_IntervalWindowCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_IntervalWindowCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalWindowCoderImpl (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_IntervalWindowCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalWindowCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_IntervalWindowCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IntervalWindowCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IntervalWindowCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_28__pyx_unpickle_IntervalWindowCoderImpl(__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_6coders_10coder_impl_28__pyx_unpickle_IntervalWindowCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalWindowCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntervalWindowCoderImpl__set_state(<IntervalWindowCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntervalWindowCoderImpl__set_state(<IntervalWindowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntervalWindowCoderImpl__set_state(<IntervalWindowCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IntervalWindowCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = IntervalWindowCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IntervalWindowCoderImpl__set_state(<IntervalWindowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IntervalWindowCoderImpl__set_state(<IntervalWindowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IntervalWindowCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IntervalWindowCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_IntervalWindowCoderImpl__set_state(<IntervalWindowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IntervalWindowCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IntervalWindowCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IntervalWindowCoderImpl__set_state(<IntervalWindowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IntervalWindowCoderImpl__set_state(IntervalWindowCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IntervalWindowCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_TimestampCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_TimestampCoderImpl = {"__pyx_unpickle_TimestampCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_TimestampCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_TimestampCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampCoderImpl (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_TimestampCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TimestampCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TimestampCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TimestampCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_30__pyx_unpickle_TimestampCoderImpl(__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_6coders_10coder_impl_30__pyx_unpickle_TimestampCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x11860ce, 0x666ec74, 0x95d62e5):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x11860ce, 0x666ec74, 0x95d62e5) = (timestamp_class))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__19, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x11860ce, 0x666ec74, 0x95d62e5):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x11860ce, 0x666ec74, 0x95d62e5) = (timestamp_class))" % __pyx_checksum)
 *     __pyx_result = TimestampCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x11860ce, 0x666ec74, 0x95d62e5):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x11860ce, 0x666ec74, 0x95d62e5) = (timestamp_class))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TimestampCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x11860ce, 0x666ec74, 0x95d62e5):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x11860ce, 0x666ec74, 0x95d62e5) = (timestamp_class))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x11860ce, 0x666ec74, 0x95d62e5) = (timestamp_class))" % __pyx_checksum)
 *     __pyx_result = TimestampCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestampCoderImpl__set_state(<TimestampCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x11860ce, 0x666ec74, 0x95d62e5) = (timestamp_class))" % __pyx_checksum)
 *     __pyx_result = TimestampCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestampCoderImpl__set_state(<TimestampCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = TimestampCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestampCoderImpl__set_state(<TimestampCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TimestampCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x11860ce, 0x666ec74, 0x95d62e5) = (timestamp_class))" % __pyx_checksum)
 *     __pyx_result = TimestampCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TimestampCoderImpl__set_state(<TimestampCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TimestampCoderImpl__set_state(<TimestampCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.timestamp_class = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TimestampCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TimestampCoderImpl__set_state(<TimestampCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.timestamp_class = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TimestampCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.timestamp_class = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->timestamp_class);
  __Pyx_DECREF(__pyx_v___pyx_result->timestamp_class);
  __pyx_v___pyx_result->timestamp_class = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.timestamp_class = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.timestamp_class = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.timestamp_class = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimestampCoderImpl__set_state(<TimestampCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.timestamp_class = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TimestampCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_VarIntCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_VarIntCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_VarIntCoderImpl = {"__pyx_unpickle_VarIntCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_VarIntCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_VarIntCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_VarIntCoderImpl (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_VarIntCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VarIntCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_VarIntCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_VarIntCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_VarIntCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_32__pyx_unpickle_VarIntCoderImpl(__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_6coders_10coder_impl_32__pyx_unpickle_VarIntCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_VarIntCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = VarIntCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = VarIntCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = VarIntCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_VarIntCoderImpl__set_state(<VarIntCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = VarIntCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_VarIntCoderImpl__set_state(<VarIntCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = VarIntCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_VarIntCoderImpl__set_state(<VarIntCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarIntCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = VarIntCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_VarIntCoderImpl__set_state(<VarIntCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_VarIntCoderImpl__set_state(<VarIntCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_VarIntCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_VarIntCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_VarIntCoderImpl__set_state(<VarIntCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_VarIntCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_VarIntCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_VarIntCoderImpl__set_state(<VarIntCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_VarIntCoderImpl__set_state(VarIntCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_VarIntCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_SingletonCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_SingletonCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_SingletonCoderImpl = {"__pyx_unpickle_SingletonCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_SingletonCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_SingletonCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonCoderImpl (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_SingletonCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SingletonCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SingletonCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SingletonCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_34__pyx_unpickle_SingletonCoderImpl(__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_6coders_10coder_impl_34__pyx_unpickle_SingletonCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xe106c97, 0xbbd7235, 0x0fab5fa):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xe106c97, 0xbbd7235, 0x0fab5fa) = (_value))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__20, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xe106c97, 0xbbd7235, 0x0fab5fa):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xe106c97, 0xbbd7235, 0x0fab5fa) = (_value))" % __pyx_checksum)
 *     __pyx_result = SingletonCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xe106c97, 0xbbd7235, 0x0fab5fa):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xe106c97, 0xbbd7235, 0x0fab5fa) = (_value))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SingletonCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xe106c97, 0xbbd7235, 0x0fab5fa):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xe106c97, 0xbbd7235, 0x0fab5fa) = (_value))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xe106c97, 0xbbd7235, 0x0fab5fa) = (_value))" % __pyx_checksum)
 *     __pyx_result = SingletonCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SingletonCoderImpl__set_state(<SingletonCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xe106c97, 0xbbd7235, 0x0fab5fa) = (_value))" % __pyx_checksum)
 *     __pyx_result = SingletonCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SingletonCoderImpl__set_state(<SingletonCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = SingletonCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SingletonCoderImpl__set_state(<SingletonCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SingletonCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xe106c97, 0xbbd7235, 0x0fab5fa) = (_value))" % __pyx_checksum)
 *     __pyx_result = SingletonCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SingletonCoderImpl__set_state(<SingletonCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SingletonCoderImpl__set_state(<SingletonCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._value = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SingletonCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SingletonCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_SingletonCoderImpl__set_state(<SingletonCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._value = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SingletonCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._value = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_value);
  __Pyx_DECREF(__pyx_v___pyx_result->_value);
  __pyx_v___pyx_result->_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._value = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._value = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._value = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_SingletonCoderImpl__set_state(<SingletonCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._value = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SingletonCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_AbstractComponentCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_AbstractComponentCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_AbstractComponentCoderImpl = {"__pyx_unpickle_AbstractComponentCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_AbstractComponentCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_AbstractComponentCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_AbstractComponentCoderImpl (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_AbstractComponentCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractComponentCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_AbstractComponentCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_AbstractComponentCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_AbstractComponentCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_36__pyx_unpickle_AbstractComponentCoderImpl(__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_6coders_10coder_impl_36__pyx_unpickle_AbstractComponentCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_AbstractComponentCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x56b63b6, 0xfbd5b57, 0x24d57b6):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__21, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x56b63b6, 0xfbd5b57, 0x24d57b6):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 *     __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x56b63b6, 0xfbd5b57, 0x24d57b6):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x56b63b6, 0xfbd5b57, 0x24d57b6):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 *     __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_AbstractComponentCoderImpl__set_state(<AbstractComponentCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 *     __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_AbstractComponentCoderImpl__set_state(<AbstractComponentCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_AbstractComponentCoderImpl__set_state(<AbstractComponentCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_AbstractComponentCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 *     __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_AbstractComponentCoderImpl__set_state(<AbstractComponentCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_AbstractComponentCoderImpl__set_state(<AbstractComponentCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._coder_impls = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_AbstractComponentCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_AbstractComponentCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_AbstractComponentCoderImpl__set_state(<AbstractComponentCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_AbstractComponentCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_AbstractComponentCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._coder_impls = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_coder_impls);
  __Pyx_DECREF(__pyx_v___pyx_result->_coder_impls);
  __pyx_v___pyx_result->_coder_impls = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_AbstractComponentCoderImpl__set_state(<AbstractComponentCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_AbstractComponentCoderImpl__set_state(AbstractComponentCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_AbstractComponentCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TupleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TupleCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TupleCoderImpl = {"__pyx_unpickle_TupleCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TupleCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TupleCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCoderImpl (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_TupleCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TupleCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_38__pyx_unpickle_TupleCoderImpl(__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_6coders_10coder_impl_38__pyx_unpickle_TupleCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x56b63b6, 0xfbd5b57, 0x24d57b6):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__21, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x56b63b6, 0xfbd5b57, 0x24d57b6):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 *     __pyx_result = TupleCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x56b63b6, 0xfbd5b57, 0x24d57b6):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TupleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x56b63b6, 0xfbd5b57, 0x24d57b6):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 *     __pyx_result = TupleCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleCoderImpl__set_state(<TupleCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 *     __pyx_result = TupleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TupleCoderImpl__set_state(<TupleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = TupleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleCoderImpl__set_state(<TupleCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x56b63b6, 0xfbd5b57, 0x24d57b6) = (_coder_impls))" % __pyx_checksum)
 *     __pyx_result = TupleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TupleCoderImpl__set_state(<TupleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleCoderImpl__set_state(<TupleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._coder_impls = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TupleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TupleCoderImpl__set_state(<TupleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._coder_impls = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._coder_impls);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._coder_impls);
  __pyx_v___pyx_result->__pyx_base._coder_impls = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TupleCoderImpl__set_state(<TupleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_SequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_SequenceCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_SequenceCoderImpl = {"__pyx_unpickle_SequenceCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_SequenceCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_SequenceCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_SequenceCoderImpl (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_SequenceCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SequenceCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_SequenceCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_SequenceCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SequenceCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_40__pyx_unpickle_SequenceCoderImpl(__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_6coders_10coder_impl_40__pyx_unpickle_SequenceCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SequenceCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__22, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = SequenceCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_8, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = SequenceCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SequenceCoderImpl__set_state(<SequenceCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = SequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SequenceCoderImpl__set_state(<SequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = SequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SequenceCoderImpl__set_state(<SequenceCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SequenceCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = SequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_SequenceCoderImpl__set_state(<SequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_SequenceCoderImpl__set_state(<SequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SequenceCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_SequenceCoderImpl__set_state(<SequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_SequenceCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SequenceCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_elem_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_elem_coder));
  __pyx_v___pyx_result->_elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_read_state);
  __Pyx_DECREF(__pyx_v___pyx_result->_read_state);
  __pyx_v___pyx_result->_read_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_write_state);
  __Pyx_DECREF(__pyx_v___pyx_result->_write_state);
  __pyx_v___pyx_result->_write_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_write_state_threshold = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 4) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __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(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_SequenceCoderImpl__set_state(<SequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_SequenceCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_TupleSequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_TupleSequenceCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_TupleSequenceCoderImpl = {"__pyx_unpickle_TupleSequenceCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_TupleSequenceCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_TupleSequenceCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleSequenceCoderImpl (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_TupleSequenceCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleSequenceCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_TupleSequenceCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_TupleSequenceCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleSequenceCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_42__pyx_unpickle_TupleSequenceCoderImpl(__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_6coders_10coder_impl_42__pyx_unpickle_TupleSequenceCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleSequenceCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__22, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_8, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleSequenceCoderImpl__set_state(<TupleSequenceCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TupleSequenceCoderImpl__set_state(<TupleSequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleSequenceCoderImpl__set_state(<TupleSequenceCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleSequenceCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_TupleSequenceCoderImpl__set_state(<TupleSequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_TupleSequenceCoderImpl__set_state(<TupleSequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TupleSequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleSequenceCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_TupleSequenceCoderImpl__set_state(<TupleSequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_TupleSequenceCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleSequenceCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._elem_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._elem_coder));
  __pyx_v___pyx_result->__pyx_base._elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._read_state);
  __pyx_v___pyx_result->__pyx_base._read_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._write_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._write_state);
  __pyx_v___pyx_result->__pyx_base._write_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._write_state_threshold = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 4) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __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(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_TupleSequenceCoderImpl__set_state(<TupleSequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_TupleSequenceCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__AbstractIterable(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_45__pyx_unpickle__AbstractIterable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_45__pyx_unpickle__AbstractIterable = {"__pyx_unpickle__AbstractIterable", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_45__pyx_unpickle__AbstractIterable, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_45__pyx_unpickle__AbstractIterable(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__AbstractIterable (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__AbstractIterable", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__AbstractIterable", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle__AbstractIterable") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__AbstractIterable", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle__AbstractIterable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_44__pyx_unpickle__AbstractIterable(__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_6coders_10coder_impl_44__pyx_unpickle__AbstractIterable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__AbstractIterable", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xcbf6c60, 0x77c43a1, 0x6800c7c):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xcbf6c60, 0x77c43a1, 0x6800c7c) = (_contents))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__23, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xcbf6c60, 0x77c43a1, 0x6800c7c):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xcbf6c60, 0x77c43a1, 0x6800c7c) = (_contents))" % __pyx_checksum)
 *     __pyx_result = _AbstractIterable.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xcbf6c60, 0x77c43a1, 0x6800c7c):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xcbf6c60, 0x77c43a1, 0x6800c7c) = (_contents))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = _AbstractIterable.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_9, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xcbf6c60, 0x77c43a1, 0x6800c7c):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xcbf6c60, 0x77c43a1, 0x6800c7c) = (_contents))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xcbf6c60, 0x77c43a1, 0x6800c7c) = (_contents))" % __pyx_checksum)
 *     __pyx_result = _AbstractIterable.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xcbf6c60, 0x77c43a1, 0x6800c7c) = (_contents))" % __pyx_checksum)
 *     __pyx_result = _AbstractIterable.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = _AbstractIterable.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__AbstractIterable__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xcbf6c60, 0x77c43a1, 0x6800c7c) = (_contents))" % __pyx_checksum)
 *     __pyx_result = _AbstractIterable.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, tuple __pyx_state):
 *     __pyx_result._contents = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__AbstractIterable(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle__AbstractIterable", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._contents = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle__AbstractIterable__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__AbstractIterable__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, tuple __pyx_state):
 *     __pyx_result._contents = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_contents);
  __Pyx_DECREF(__pyx_v___pyx_result->_contents);
  __pyx_v___pyx_result->_contents = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, tuple __pyx_state):
 *     __pyx_result._contents = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._contents = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, tuple __pyx_state):
 *     __pyx_result._contents = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__AbstractIterable__set_state(<_AbstractIterable> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__AbstractIterable__set_state(_AbstractIterable __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._contents = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle__AbstractIterable__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_IterableCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_IterableCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_IterableCoderImpl = {"__pyx_unpickle_IterableCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_IterableCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_IterableCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_IterableCoderImpl (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_IterableCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IterableCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_IterableCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IterableCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IterableCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_46__pyx_unpickle_IterableCoderImpl(__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_6coders_10coder_impl_46__pyx_unpickle_IterableCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IterableCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x3c5c876, 0xf875643, 0xe4d5390):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x3c5c876, 0xf875643, 0xe4d5390) = (_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__24, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x3c5c876, 0xf875643, 0xe4d5390):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x3c5c876, 0xf875643, 0xe4d5390) = (_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = IterableCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x3c5c876, 0xf875643, 0xe4d5390):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x3c5c876, 0xf875643, 0xe4d5390) = (_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = IterableCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_10, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x3c5c876, 0xf875643, 0xe4d5390):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x3c5c876, 0xf875643, 0xe4d5390) = (_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x3c5c876, 0xf875643, 0xe4d5390) = (_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = IterableCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IterableCoderImpl__set_state(<IterableCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x3c5c876, 0xf875643, 0xe4d5390) = (_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = IterableCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IterableCoderImpl__set_state(<IterableCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = IterableCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IterableCoderImpl__set_state(<IterableCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IterableCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x3c5c876, 0xf875643, 0xe4d5390) = (_elem_coder, _read_state, _use_abstract_iterable, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = IterableCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_IterableCoderImpl__set_state(<IterableCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_IterableCoderImpl__set_state(<IterableCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IterableCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IterableCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_IterableCoderImpl__set_state(<IterableCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_IterableCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IterableCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     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(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._elem_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._elem_coder));
  __pyx_v___pyx_result->__pyx_base._elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._read_state);
  __pyx_v___pyx_result->__pyx_base._read_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_use_abstract_iterable = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._write_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._write_state);
  __pyx_v___pyx_result->__pyx_base._write_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._write_state_threshold = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4]
 *     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(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 5) != 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(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_IterableCoderImpl__set_state(<IterableCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4]
 *     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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_IterableCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ListCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_ListCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_ListCoderImpl = {"__pyx_unpickle_ListCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_ListCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_ListCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ListCoderImpl (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_ListCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ListCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ListCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ListCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ListCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_48__pyx_unpickle_ListCoderImpl(__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_6coders_10coder_impl_48__pyx_unpickle_ListCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ListCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__22, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = ListCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ListCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_8, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb581fbd, 0x72ca29b, 0x185d0a4):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = ListCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ListCoderImpl__set_state(<ListCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = ListCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ListCoderImpl__set_state(<ListCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = ListCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ListCoderImpl__set_state(<ListCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ListCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb581fbd, 0x72ca29b, 0x185d0a4) = (_elem_coder, _read_state, _write_state, _write_state_threshold))" % __pyx_checksum)
 *     __pyx_result = ListCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ListCoderImpl__set_state(<ListCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ListCoderImpl__set_state(<ListCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ListCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ListCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_ListCoderImpl__set_state(<ListCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ListCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ListCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._elem_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._elem_coder));
  __pyx_v___pyx_result->__pyx_base._elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._read_state);
  __pyx_v___pyx_result->__pyx_base._read_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._write_state);
  __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base._write_state);
  __pyx_v___pyx_result->__pyx_base._write_state = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->__pyx_base._write_state_threshold = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 4) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __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(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ListCoderImpl__set_state(<ListCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ListCoderImpl__set_state(ListCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ListCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_PaneInfoCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_PaneInfoCoderImpl = {"__pyx_unpickle_PaneInfoCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_PaneInfoCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_PaneInfoCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_PaneInfoCoderImpl (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_PaneInfoCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PaneInfoCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_PaneInfoCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PaneInfoCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_PaneInfoCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_50__pyx_unpickle_PaneInfoCoderImpl(__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_6coders_10coder_impl_50__pyx_unpickle_PaneInfoCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_PaneInfoCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PaneInfoCoderImpl__set_state(<PaneInfoCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_PaneInfoCoderImpl__set_state(<PaneInfoCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PaneInfoCoderImpl__set_state(<PaneInfoCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_PaneInfoCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_PaneInfoCoderImpl__set_state(<PaneInfoCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PaneInfoCoderImpl__set_state(<PaneInfoCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_PaneInfoCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_PaneInfoCoderImpl__set_state(<PaneInfoCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_PaneInfoCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_PaneInfoCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_PaneInfoCoderImpl__set_state(<PaneInfoCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_PaneInfoCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_WindowedValueCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_WindowedValueCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_WindowedValueCoderImpl = {"__pyx_unpickle_WindowedValueCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_WindowedValueCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_WindowedValueCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedValueCoderImpl (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_WindowedValueCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_WindowedValueCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_WindowedValueCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_WindowedValueCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_WindowedValueCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_52__pyx_unpickle_WindowedValueCoderImpl(__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_6coders_10coder_impl_52__pyx_unpickle_WindowedValueCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedValueCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7f7a287, 0x6be047d, 0x87e748d):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7f7a287, 0x6be047d, 0x87e748d) = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__25, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7f7a287, 0x6be047d, 0x87e748d):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7f7a287, 0x6be047d, 0x87e748d) = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)
 *     __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x7f7a287, 0x6be047d, 0x87e748d):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7f7a287, 0x6be047d, 0x87e748d) = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_11, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x7f7a287, 0x6be047d, 0x87e748d):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7f7a287, 0x6be047d, 0x87e748d) = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7f7a287, 0x6be047d, 0x87e748d) = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)
 *     __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_WindowedValueCoderImpl__set_state(<WindowedValueCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7f7a287, 0x6be047d, 0x87e748d) = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)
 *     __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_WindowedValueCoderImpl__set_state(<WindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_WindowedValueCoderImpl__set_state(<WindowedValueCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_WindowedValueCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x7f7a287, 0x6be047d, 0x87e748d) = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)
 *     __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_WindowedValueCoderImpl__set_state(<WindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_WindowedValueCoderImpl__set_state(<WindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_WindowedValueCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_WindowedValueCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_WindowedValueCoderImpl__set_state(<WindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_WindowedValueCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedValueCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_pane_info_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_pane_info_coder));
  __pyx_v___pyx_result->_pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_timestamp_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_timestamp_coder));
  __pyx_v___pyx_result->_timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_value_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_value_coder));
  __pyx_v___pyx_result->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_windows_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_windows_coder));
  __pyx_v___pyx_result->_windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_WindowedValueCoderImpl__set_state(<WindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_WindowedValueCoderImpl__set_state(WindowedValueCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pane_info_coder = __pyx_state[0]; __pyx_result._timestamp_coder = __pyx_state[1]; __pyx_result._value_coder = __pyx_state[2]; __pyx_result._windows_coder = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_WindowedValueCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_ParamWindowedValueCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_55__pyx_unpickle_ParamWindowedValueCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_55__pyx_unpickle_ParamWindowedValueCoderImpl = {"__pyx_unpickle_ParamWindowedValueCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_55__pyx_unpickle_ParamWindowedValueCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_55__pyx_unpickle_ParamWindowedValueCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_ParamWindowedValueCoderImpl (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_ParamWindowedValueCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ParamWindowedValueCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_ParamWindowedValueCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_ParamWindowedValueCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ParamWindowedValueCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_54__pyx_unpickle_ParamWindowedValueCoderImpl(__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_6coders_10coder_impl_54__pyx_unpickle_ParamWindowedValueCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ParamWindowedValueCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x861f76a, 0x042c030, 0xc4f2637):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x861f76a, 0x042c030, 0xc4f2637) = (_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__26, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x861f76a, 0x042c030, 0xc4f2637):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x861f76a, 0x042c030, 0xc4f2637) = (_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder))" % __pyx_checksum)
 *     __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x861f76a, 0x042c030, 0xc4f2637):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x861f76a, 0x042c030, 0xc4f2637) = (_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_12, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x861f76a, 0x042c030, 0xc4f2637):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x861f76a, 0x042c030, 0xc4f2637) = (_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x861f76a, 0x042c030, 0xc4f2637) = (_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder))" % __pyx_checksum)
 *     __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(<ParamWindowedValueCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x861f76a, 0x042c030, 0xc4f2637) = (_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder))" % __pyx_checksum)
 *     __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(<ParamWindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(<ParamWindowedValueCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ParamWindowedValueCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x861f76a, 0x042c030, 0xc4f2637) = (_pane_info, _pane_info_coder, _timestamp, _timestamp_coder, _value_coder, _windows, _windows_coder))" % __pyx_checksum)
 *     __pyx_result = ParamWindowedValueCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(<ParamWindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(<ParamWindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ParamWindowedValueCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ParamWindowedValueCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(<ParamWindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_ParamWindowedValueCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int64_t __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_ParamWindowedValueCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_pane_info);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_pane_info));
  __pyx_v___pyx_result->_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._pane_info_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._pane_info_coder));
  __pyx_v___pyx_result->__pyx_base._pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->_timestamp = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._timestamp_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._timestamp_coder));
  __pyx_v___pyx_result->__pyx_base._timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._value_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._value_coder));
  __pyx_v___pyx_result->__pyx_base._value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_windows);
  __Pyx_DECREF(__pyx_v___pyx_result->_windows);
  __pyx_v___pyx_result->_windows = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._windows_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._windows_coder));
  __pyx_v___pyx_result->__pyx_base._windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 7) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_3 = __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(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_3 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(<ParamWindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_ParamWindowedValueCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_LengthPrefixCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_LengthPrefixCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_LengthPrefixCoderImpl = {"__pyx_unpickle_LengthPrefixCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_LengthPrefixCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_LengthPrefixCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_LengthPrefixCoderImpl (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_LengthPrefixCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LengthPrefixCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_LengthPrefixCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LengthPrefixCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LengthPrefixCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_56__pyx_unpickle_LengthPrefixCoderImpl(__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_6coders_10coder_impl_56__pyx_unpickle_LengthPrefixCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_LengthPrefixCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x5789e75, 0x7fd8b79, 0x057c964):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x5789e75, 0x7fd8b79, 0x057c964) = (_value_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__27, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x5789e75, 0x7fd8b79, 0x057c964):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x5789e75, 0x7fd8b79, 0x057c964) = (_value_coder))" % __pyx_checksum)
 *     __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x5789e75, 0x7fd8b79, 0x057c964):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x5789e75, 0x7fd8b79, 0x057c964) = (_value_coder))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_13, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x5789e75, 0x7fd8b79, 0x057c964):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x5789e75, 0x7fd8b79, 0x057c964) = (_value_coder))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x5789e75, 0x7fd8b79, 0x057c964) = (_value_coder))" % __pyx_checksum)
 *     __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_LengthPrefixCoderImpl__set_state(<LengthPrefixCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x5789e75, 0x7fd8b79, 0x057c964) = (_value_coder))" % __pyx_checksum)
 *     __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_LengthPrefixCoderImpl__set_state(<LengthPrefixCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_LengthPrefixCoderImpl__set_state(<LengthPrefixCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LengthPrefixCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x5789e75, 0x7fd8b79, 0x057c964) = (_value_coder))" % __pyx_checksum)
 *     __pyx_result = LengthPrefixCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_LengthPrefixCoderImpl__set_state(<LengthPrefixCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_LengthPrefixCoderImpl__set_state(<LengthPrefixCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._value_coder = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_LengthPrefixCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LengthPrefixCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_LengthPrefixCoderImpl__set_state(<LengthPrefixCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._value_coder = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LengthPrefixCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_LengthPrefixCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._value_coder = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_value_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_value_coder));
  __pyx_v___pyx_result->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._value_coder = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._value_coder = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._value_coder = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_LengthPrefixCoderImpl__set_state(<LengthPrefixCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_LengthPrefixCoderImpl__set_state(LengthPrefixCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._value_coder = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LengthPrefixCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_RowColumnEncoder(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_RowColumnEncoder(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_RowColumnEncoder = {"__pyx_unpickle_RowColumnEncoder", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_RowColumnEncoder, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_RowColumnEncoder(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowColumnEncoder (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_RowColumnEncoder", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowColumnEncoder", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RowColumnEncoder") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowColumnEncoder", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_58__pyx_unpickle_RowColumnEncoder(__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_6coders_10coder_impl_58__pyx_unpickle_RowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowColumnEncoder", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = RowColumnEncoder.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = RowColumnEncoder.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = RowColumnEncoder.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowColumnEncoder__set_state(<RowColumnEncoder> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = RowColumnEncoder.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RowColumnEncoder__set_state(<RowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = RowColumnEncoder.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowColumnEncoder__set_state(<RowColumnEncoder> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowColumnEncoder__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = RowColumnEncoder.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RowColumnEncoder__set_state(<RowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowColumnEncoder__set_state(<RowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_RowColumnEncoder(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowColumnEncoder", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_RowColumnEncoder__set_state(<RowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowColumnEncoder__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_RowColumnEncoder__set_state(<RowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowColumnEncoder__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_GenericRowColumnEncoder(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_GenericRowColumnEncoder(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_GenericRowColumnEncoder = {"__pyx_unpickle_GenericRowColumnEncoder", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_GenericRowColumnEncoder, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_GenericRowColumnEncoder(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_GenericRowColumnEncoder (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_GenericRowColumnEncoder", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GenericRowColumnEncoder", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_GenericRowColumnEncoder") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_GenericRowColumnEncoder", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_GenericRowColumnEncoder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_60__pyx_unpickle_GenericRowColumnEncoder(__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_6coders_10coder_impl_60__pyx_unpickle_GenericRowColumnEncoder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_GenericRowColumnEncoder", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xf452421, 0x6ad26e8, 0xf2b4268):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf452421, 0x6ad26e8, 0xf2b4268) = (coder_impl, column))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__28, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xf452421, 0x6ad26e8, 0xf2b4268):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf452421, 0x6ad26e8, 0xf2b4268) = (coder_impl, column))" % __pyx_checksum)
 *     __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xf452421, 0x6ad26e8, 0xf2b4268):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf452421, 0x6ad26e8, 0xf2b4268) = (coder_impl, column))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_14, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xf452421, 0x6ad26e8, 0xf2b4268):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf452421, 0x6ad26e8, 0xf2b4268) = (coder_impl, column))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf452421, 0x6ad26e8, 0xf2b4268) = (coder_impl, column))" % __pyx_checksum)
 *     __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_GenericRowColumnEncoder__set_state(<GenericRowColumnEncoder> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf452421, 0x6ad26e8, 0xf2b4268) = (coder_impl, column))" % __pyx_checksum)
 *     __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_GenericRowColumnEncoder__set_state(<GenericRowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_GenericRowColumnEncoder__set_state(<GenericRowColumnEncoder> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_GenericRowColumnEncoder__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xf452421, 0x6ad26e8, 0xf2b4268) = (coder_impl, column))" % __pyx_checksum)
 *     __pyx_result = GenericRowColumnEncoder.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_GenericRowColumnEncoder__set_state(<GenericRowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_GenericRowColumnEncoder__set_state(<GenericRowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_GenericRowColumnEncoder(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_GenericRowColumnEncoder", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_GenericRowColumnEncoder__set_state(<GenericRowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_GenericRowColumnEncoder__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_GenericRowColumnEncoder__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->coder_impl);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->coder_impl));
  __pyx_v___pyx_result->coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->column);
  __Pyx_DECREF(__pyx_v___pyx_result->column);
  __pyx_v___pyx_result->column = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, tuple __pyx_state):
 *     __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_GenericRowColumnEncoder__set_state(<GenericRowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_GenericRowColumnEncoder__set_state(GenericRowColumnEncoder __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.coder_impl = __pyx_state[0]; __pyx_result.column = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_GenericRowColumnEncoder__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_RowCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_63__pyx_unpickle_RowCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_63__pyx_unpickle_RowCoderImpl = {"__pyx_unpickle_RowCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_63__pyx_unpickle_RowCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_63__pyx_unpickle_RowCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowCoderImpl (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_RowCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RowCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RowCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_62__pyx_unpickle_RowCoderImpl(__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_6coders_10coder_impl_62__pyx_unpickle_RowCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0c10601, 0xf2b4193, 0x540fa75):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0c10601, 0xf2b4193, 0x540fa75) = (components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__29, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0c10601, 0xf2b4193, 0x540fa75):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0c10601, 0xf2b4193, 0x540fa75) = (components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema))" % __pyx_checksum)
 *     __pyx_result = RowCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x0c10601, 0xf2b4193, 0x540fa75):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0c10601, 0xf2b4193, 0x540fa75) = (components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = RowCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_15, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x0c10601, 0xf2b4193, 0x540fa75):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0c10601, 0xf2b4193, 0x540fa75) = (components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0c10601, 0xf2b4193, 0x540fa75) = (components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema))" % __pyx_checksum)
 *     __pyx_result = RowCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowCoderImpl__set_state(<RowCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0c10601, 0xf2b4193, 0x540fa75) = (components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema))" % __pyx_checksum)
 *     __pyx_result = RowCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RowCoderImpl__set_state(<RowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = RowCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowCoderImpl__set_state(<RowCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x0c10601, 0xf2b4193, 0x540fa75) = (components, constructor, encoding_positions, encoding_positions_are_trivial, encoding_positions_argsort, field_names, field_nullable, has_nullable_fields, num_fields, schema))" % __pyx_checksum)
 *     __pyx_result = RowCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_RowCoderImpl__set_state(<RowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_RowCoderImpl__set_state(<RowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_RowCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_RowCoderImpl__set_state(<RowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_RowCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_RowCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[10])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->components);
  __Pyx_DECREF(__pyx_v___pyx_result->components);
  __pyx_v___pyx_result->components = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->constructor);
  __Pyx_DECREF(__pyx_v___pyx_result->constructor);
  __pyx_v___pyx_result->constructor = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->encoding_positions);
  __Pyx_DECREF(__pyx_v___pyx_result->encoding_positions);
  __pyx_v___pyx_result->encoding_positions = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->encoding_positions_are_trivial = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->encoding_positions_argsort);
  __Pyx_DECREF(__pyx_v___pyx_result->encoding_positions_argsort);
  __pyx_v___pyx_result->encoding_positions_argsort = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->field_names);
  __Pyx_DECREF(__pyx_v___pyx_result->field_names);
  __pyx_v___pyx_result->field_names = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->field_nullable);
  __Pyx_DECREF(__pyx_v___pyx_result->field_nullable);
  __pyx_v___pyx_result->field_nullable = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->has_nullable_fields = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->num_fields = __pyx_t_3;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->schema);
  __Pyx_DECREF(__pyx_v___pyx_result->schema);
  __pyx_v___pyx_result->schema = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[10])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_4 > 10) != 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(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[10])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[10])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_RowCoderImpl__set_state(<RowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_RowCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_LogicalTypeCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_LogicalTypeCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_LogicalTypeCoderImpl = {"__pyx_unpickle_LogicalTypeCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_LogicalTypeCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_LogicalTypeCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_LogicalTypeCoderImpl (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_LogicalTypeCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogicalTypeCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_LogicalTypeCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogicalTypeCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LogicalTypeCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_64__pyx_unpickle_LogicalTypeCoderImpl(__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_6coders_10coder_impl_64__pyx_unpickle_LogicalTypeCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_LogicalTypeCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x10f5c41, 0xb7905bf, 0x2e68dea):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x10f5c41, 0xb7905bf, 0x2e68dea) = (logical_type, representation_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__30, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x10f5c41, 0xb7905bf, 0x2e68dea):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x10f5c41, 0xb7905bf, 0x2e68dea) = (logical_type, representation_coder))" % __pyx_checksum)
 *     __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0x10f5c41, 0xb7905bf, 0x2e68dea):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x10f5c41, 0xb7905bf, 0x2e68dea) = (logical_type, representation_coder))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_16, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x10f5c41, 0xb7905bf, 0x2e68dea):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x10f5c41, 0xb7905bf, 0x2e68dea) = (logical_type, representation_coder))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x10f5c41, 0xb7905bf, 0x2e68dea) = (logical_type, representation_coder))" % __pyx_checksum)
 *     __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_LogicalTypeCoderImpl__set_state(<LogicalTypeCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x10f5c41, 0xb7905bf, 0x2e68dea) = (logical_type, representation_coder))" % __pyx_checksum)
 *     __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_LogicalTypeCoderImpl__set_state(<LogicalTypeCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_LogicalTypeCoderImpl__set_state(<LogicalTypeCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LogicalTypeCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0x10f5c41, 0xb7905bf, 0x2e68dea) = (logical_type, representation_coder))" % __pyx_checksum)
 *     __pyx_result = LogicalTypeCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_LogicalTypeCoderImpl__set_state(<LogicalTypeCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_LogicalTypeCoderImpl__set_state(<LogicalTypeCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_LogicalTypeCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LogicalTypeCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_LogicalTypeCoderImpl__set_state(<LogicalTypeCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_LogicalTypeCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_LogicalTypeCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->logical_type);
  __Pyx_DECREF(__pyx_v___pyx_result->logical_type);
  __pyx_v___pyx_result->logical_type = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->representation_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->representation_coder));
  __pyx_v___pyx_result->representation_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_LogicalTypeCoderImpl__set_state(<LogicalTypeCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_LogicalTypeCoderImpl__set_state(LogicalTypeCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.logical_type = __pyx_state[0]; __pyx_result.representation_coder = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_LogicalTypeCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_BigIntegerCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_BigIntegerCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_BigIntegerCoderImpl = {"__pyx_unpickle_BigIntegerCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_BigIntegerCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_BigIntegerCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_BigIntegerCoderImpl (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_BigIntegerCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BigIntegerCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_BigIntegerCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_BigIntegerCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigIntegerCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_66__pyx_unpickle_BigIntegerCoderImpl(__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_6coders_10coder_impl_66__pyx_unpickle_BigIntegerCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BigIntegerCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BigIntegerCoderImpl__set_state(<BigIntegerCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BigIntegerCoderImpl__set_state(<BigIntegerCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BigIntegerCoderImpl__set_state(<BigIntegerCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigIntegerCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = BigIntegerCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_BigIntegerCoderImpl__set_state(<BigIntegerCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_BigIntegerCoderImpl__set_state(<BigIntegerCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BigIntegerCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigIntegerCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_BigIntegerCoderImpl__set_state(<BigIntegerCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_BigIntegerCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BigIntegerCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_BigIntegerCoderImpl__set_state(<BigIntegerCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_BigIntegerCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_DecimalCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_DecimalCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_DecimalCoderImpl = {"__pyx_unpickle_DecimalCoderImpl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_DecimalCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_DecimalCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalCoderImpl (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_DecimalCoderImpl", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalCoderImpl", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_DecimalCoderImpl") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_DecimalCoderImpl", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_DecimalCoderImpl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_68__pyx_unpickle_DecimalCoderImpl(__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_6coders_10coder_impl_68__pyx_unpickle_DecimalCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalCoderImpl", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__15, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = DecimalCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DecimalCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = DecimalCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DecimalCoderImpl__set_state(<DecimalCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = DecimalCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DecimalCoderImpl__set_state(<DecimalCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = DecimalCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DecimalCoderImpl__set_state(<DecimalCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_DecimalCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = DecimalCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DecimalCoderImpl__set_state(<DecimalCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DecimalCoderImpl__set_state(<DecimalCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DecimalCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_DecimalCoderImpl", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_DecimalCoderImpl__set_state(<DecimalCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_DecimalCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DecimalCoderImpl__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_DecimalCoderImpl__set_state(<DecimalCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DecimalCoderImpl__set_state(DecimalCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_DecimalCoderImpl__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":123
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

/* Python wrapper */
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shape = 0;
  Py_ssize_t __pyx_v_itemsize;
  PyObject *__pyx_v_format = 0;
  PyObject *__pyx_v_mode = 0;
  int __pyx_v_allocate_buffer;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)__pyx_n_s_c);
    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_shape)) != 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_itemsize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 123, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 123, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 123, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_shape = ((PyObject*)values[0]);
    __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error)
    __pyx_v_format = values[2];
    __pyx_v_mode = values[3];
    if (values[4]) {
      __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 124, __pyx_L3_error)
    } else {

      /* "View.MemoryView":124
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
 *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
 * 
 *         cdef int idx
 */
      __pyx_v_allocate_buffer = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 123, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 123, __pyx_L1_error)
  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 123, __pyx_L1_error)
  }
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);

  /* "View.MemoryView":123
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

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

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_dim;
  PyObject **__pyx_v_p;
  char __pyx_v_order;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_format);

  /* "View.MemoryView":130
 *         cdef PyObject **p
 * 
 *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
 *         self.itemsize = itemsize
 * 
 */
  if (unlikely(__pyx_v_shape == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 130, __pyx_L1_error)
  }
  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 130, __pyx_L1_error)
  __pyx_v_self->ndim = ((int)__pyx_t_1);

  /* "View.MemoryView":131
 * 
 *         self.ndim = <int> len(shape)
 *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not self.ndim:
 */
  __pyx_v_self->itemsize = __pyx_v_itemsize;

  /* "View.MemoryView":133
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":134
 * 
 *         if not self.ndim:
 *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if itemsize <= 0:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 134, __pyx_L1_error)

    /* "View.MemoryView":133
 *         self.itemsize = itemsize
 * 
 *         if not self.ndim:             # <<<<<<<<<<<<<<
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 */
  }

  /* "View.MemoryView":136
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 */
  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":137
 * 
 *         if itemsize <= 0:
 *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(format, bytes):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 137, __pyx_L1_error)

    /* "View.MemoryView":136
 *             raise ValueError("Empty shape tuple for cython.array")
 * 
 *         if itemsize <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 */
  }

  /* "View.MemoryView":139
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_4) {

    /* "View.MemoryView":140
 * 
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":139
 *             raise ValueError("itemsize <= 0 for cython.array")
 * 
 *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 */
  }

  /* "View.MemoryView":141
 *         if not isinstance(format, bytes):
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
 *         self.format = self._format
 * 
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(1, 141, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_format;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_format);
  __Pyx_DECREF(__pyx_v_self->_format);
  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "View.MemoryView":142
 *             format = format.encode('ASCII')
 *         self._format = format  # keep a reference to the byte string
 *         self.format = self._format             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (unlikely(__pyx_v_self->_format == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(1, 142, __pyx_L1_error)
  }
  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 142, __pyx_L1_error)
  __pyx_v_self->format = __pyx_t_7;

  /* "View.MemoryView":145
 * 
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
 *         self._strides = self._shape + self.ndim
 * 
 */
  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));

  /* "View.MemoryView":146
 * 
 *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
 *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
 * 
 *         if not self._shape:
 */
  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);

  /* "View.MemoryView":148
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError("unable to allocate shape and strides.")
 * 
 */
  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "View.MemoryView":149
 * 
 *         if not self._shape:
 *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 149, __pyx_L1_error)

    /* "View.MemoryView":148
 *         self._strides = self._shape + self.ndim
 * 
 *         if not self._shape:             # <<<<<<<<<<<<<<
 *             raise MemoryError("unable to allocate shape and strides.")
 * 
 */
  }

  /* "View.MemoryView":152
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 */
  __pyx_t_8 = 0;
  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_1 >= 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_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 152, __pyx_L1_error)
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 152, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_9;
    __pyx_v_idx = __pyx_t_8;
    __pyx_t_8 = (__pyx_t_8 + 1);

    /* "View.MemoryView":153
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 *             self._shape[idx] = dim
 */
    __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":154
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))             # <<<<<<<<<<<<<<
 *             self._shape[idx] = dim
 * 
 */
      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
      __pyx_t_5 = 0;
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(1, 154, __pyx_L1_error)

      /* "View.MemoryView":153
 * 
 *         for idx, dim in enumerate(shape):
 *             if dim <= 0:             # <<<<<<<<<<<<<<
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 *             self._shape[idx] = dim
 */
    }

    /* "View.MemoryView":155
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
 * 
 *         cdef char order
 */
    (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;

    /* "View.MemoryView":152
 * 
 * 
 *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
 *             if dim <= 0:
 *                 raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":158
 * 
 *         cdef char order
 *         if mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 158, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "View.MemoryView":159
 *         cdef char order
 *         if mode == 'fortran':
 *             order = b'F'             # <<<<<<<<<<<<<<
 *             self.mode = u'fortran'
 *         elif mode == 'c':
 */
    __pyx_v_order = 'F';

    /* "View.MemoryView":160
 *         if mode == 'fortran':
 *             order = b'F'
 *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
 *         elif mode == 'c':
 *             order = b'C'
 */
    __Pyx_INCREF(__pyx_n_u_fortran);
    __Pyx_GIVEREF(__pyx_n_u_fortran);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_n_u_fortran;

    /* "View.MemoryView":158
 * 
 *         cdef char order
 *         if mode == 'fortran':             # <<<<<<<<<<<<<<
 *             order = b'F'
 *             self.mode = u'fortran'
 */
    goto __pyx_L10;
  }

  /* "View.MemoryView":161
 *             order = b'F'
 *             self.mode = u'fortran'
 *         elif mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 161, __pyx_L1_error)
  if (likely(__pyx_t_4)) {

    /* "View.MemoryView":162
 *             self.mode = u'fortran'
 *         elif mode == 'c':
 *             order = b'C'             # <<<<<<<<<<<<<<
 *             self.mode = u'c'
 *         else:
 */
    __pyx_v_order = 'C';

    /* "View.MemoryView":163
 *         elif mode == 'c':
 *             order = b'C'
 *             self.mode = u'c'             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
 */
    __Pyx_INCREF(__pyx_n_u_c);
    __Pyx_GIVEREF(__pyx_n_u_c);
    __Pyx_GOTREF(__pyx_v_self->mode);
    __Pyx_DECREF(__pyx_v_self->mode);
    __pyx_v_self->mode = __pyx_n_u_c;

    /* "View.MemoryView":161
 *             order = b'F'
 *             self.mode = u'fortran'
 *         elif mode == 'c':             # <<<<<<<<<<<<<<
 *             order = b'C'
 *             self.mode = u'c'
 */
    goto __pyx_L10;
  }

  /* "View.MemoryView":165
 *             self.mode = u'c'
 *         else:
 *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)             # <<<<<<<<<<<<<<
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides,
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_10, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __PYX_ERR(1, 165, __pyx_L1_error)
  }
  __pyx_L10:;

  /* "View.MemoryView":167
 *             raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
 * 
 *         self.len = fill_contig_strides_array(self._shape, self._strides,             # <<<<<<<<<<<<<<
 *                                              itemsize, self.ndim, order)
 * 
 */
  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);

  /* "View.MemoryView":170
 *                                              itemsize, self.ndim, order)
 * 
 *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
 *         self.dtype_is_object = format == b'O'
 *         if allocate_buffer:
 */
  __pyx_v_self->free_data = __pyx_v_allocate_buffer;

  /* "View.MemoryView":171
 * 
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
 *         if allocate_buffer:
 * 
 */
  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 171, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_v_self->dtype_is_object = __pyx_t_4;

  /* "View.MemoryView":172
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
  if (__pyx_t_4) {

    /* "View.MemoryView":175
 * 
 * 
 *             self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
 *             if not self.data:
 *                 raise MemoryError("unable to allocate array data.")
 */
    __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));

    /* "View.MemoryView":176
 * 
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("unable to allocate array data.")
 * 
 */
    __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":177
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:
 *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
 * 
 *             if self.dtype_is_object:
 */
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(1, 177, __pyx_L1_error)

      /* "View.MemoryView":176
 * 
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:             # <<<<<<<<<<<<<<
 *                 raise MemoryError("unable to allocate array data.")
 * 
 */
    }

    /* "View.MemoryView":179
 *                 raise MemoryError("unable to allocate array data.")
 * 
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):
 */
    __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
    if (__pyx_t_4) {

      /* "View.MemoryView":180
 * 
 *             if self.dtype_is_object:
 *                 p = <PyObject **> self.data             # <<<<<<<<<<<<<<
 *                 for i in range(self.len / itemsize):
 *                     p[i] = Py_None
 */
      __pyx_v_p = ((PyObject **)__pyx_v_self->data);

      /* "View.MemoryView":181
 *             if self.dtype_is_object:
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):             # <<<<<<<<<<<<<<
 *                     p[i] = Py_None
 *                     Py_INCREF(Py_None)
 */
      if (unlikely(__pyx_v_itemsize == 0)) {
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
        __PYX_ERR(1, 181, __pyx_L1_error)
      }
      else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
        PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
        __PYX_ERR(1, 181, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
      __pyx_t_9 = __pyx_t_1;
      for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
        __pyx_v_i = __pyx_t_11;

        /* "View.MemoryView":182
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):
 *                     p[i] = Py_None             # <<<<<<<<<<<<<<
 *                     Py_INCREF(Py_None)
 * 
 */
        (__pyx_v_p[__pyx_v_i]) = Py_None;

        /* "View.MemoryView":183
 *                 for i in range(self.len / itemsize):
 *                     p[i] = Py_None
 *                     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
        Py_INCREF(Py_None);
      }

      /* "View.MemoryView":179
 *                 raise MemoryError("unable to allocate array data.")
 * 
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 p = <PyObject **> self.data
 *                 for i in range(self.len / itemsize):
 */
    }

    /* "View.MemoryView":172
 *         self.free_data = allocate_buffer
 *         self.dtype_is_object = format == b'O'
 *         if allocate_buffer:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":123
 *         cdef bint dtype_is_object
 * 
 *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
 *                   mode="c", bint allocate_buffer=True):
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_format);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":186
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         cdef int bufmode = -1
 *         if self.mode == u"c":
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

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

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_bufmode;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":187
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 */
  __pyx_v_bufmode = -1;

  /* "View.MemoryView":188
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if self.mode == u"c":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 188, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":189
 *         cdef int bufmode = -1
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 */
    __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

    /* "View.MemoryView":188
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         cdef int bufmode = -1
 *         if self.mode == u"c":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":190
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 190, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":191
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 */
    __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);

    /* "View.MemoryView":190
 *         if self.mode == u"c":
 *             bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":192
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data
 */
  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":193
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
 *         info.buf = self.data
 *         info.len = self.len
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 193, __pyx_L1_error)

    /* "View.MemoryView":192
 *         elif self.mode == u"fortran":
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):             # <<<<<<<<<<<<<<
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data
 */
  }

  /* "View.MemoryView":194
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data             # <<<<<<<<<<<<<<
 *         info.len = self.len
 *         info.ndim = self.ndim
 */
  __pyx_t_4 = __pyx_v_self->data;
  __pyx_v_info->buf = __pyx_t_4;

  /* "View.MemoryView":195
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")
 *         info.buf = self.data
 *         info.len = self.len             # <<<<<<<<<<<<<<
 *         info.ndim = self.ndim
 *         info.shape = self._shape
 */
  __pyx_t_5 = __pyx_v_self->len;
  __pyx_v_info->len = __pyx_t_5;

  /* "View.MemoryView":196
 *         info.buf = self.data
 *         info.len = self.len
 *         info.ndim = self.ndim             # <<<<<<<<<<<<<<
 *         info.shape = self._shape
 *         info.strides = self._strides
 */
  __pyx_t_6 = __pyx_v_self->ndim;
  __pyx_v_info->ndim = __pyx_t_6;

  /* "View.MemoryView":197
 *         info.len = self.len
 *         info.ndim = self.ndim
 *         info.shape = self._shape             # <<<<<<<<<<<<<<
 *         info.strides = self._strides
 *         info.suboffsets = NULL
 */
  __pyx_t_7 = __pyx_v_self->_shape;
  __pyx_v_info->shape = __pyx_t_7;

  /* "View.MemoryView":198
 *         info.ndim = self.ndim
 *         info.shape = self._shape
 *         info.strides = self._strides             # <<<<<<<<<<<<<<
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize
 */
  __pyx_t_7 = __pyx_v_self->_strides;
  __pyx_v_info->strides = __pyx_t_7;

  /* "View.MemoryView":199
 *         info.shape = self._shape
 *         info.strides = self._strides
 *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *         info.itemsize = self.itemsize
 *         info.readonly = 0
 */
  __pyx_v_info->suboffsets = NULL;

  /* "View.MemoryView":200
 *         info.strides = self._strides
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
 *         info.readonly = 0
 * 
 */
  __pyx_t_5 = __pyx_v_self->itemsize;
  __pyx_v_info->itemsize = __pyx_t_5;

  /* "View.MemoryView":201
 *         info.suboffsets = NULL
 *         info.itemsize = self.itemsize
 *         info.readonly = 0             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
  __pyx_v_info->readonly = 0;

  /* "View.MemoryView":203
 *         info.readonly = 0
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.format
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":204
 * 
 *         if flags & PyBUF_FORMAT:
 *             info.format = self.format             # <<<<<<<<<<<<<<
 *         else:
 *             info.format = NULL
 */
    __pyx_t_4 = __pyx_v_self->format;
    __pyx_v_info->format = __pyx_t_4;

    /* "View.MemoryView":203
 *         info.readonly = 0
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.format
 *         else:
 */
    goto __pyx_L5;
  }

  /* "View.MemoryView":206
 *             info.format = self.format
 *         else:
 *             info.format = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.obj = self
 */
  /*else*/ {
    __pyx_v_info->format = NULL;
  }
  __pyx_L5:;

  /* "View.MemoryView":208
 *             info.format = NULL
 * 
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":186
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         cdef int bufmode = -1
 *         if self.mode == u"c":
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":212
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 */

/* Python wrapper */
static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));

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

static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "View.MemoryView":213
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 */
  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":214
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
 *         elif self.free_data:
 *             if self.dtype_is_object:
 */
    __pyx_v_self->callback_free_data(__pyx_v_self->data);

    /* "View.MemoryView":213
 * 
 *     def __dealloc__(array self):
 *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":215
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape,
 */
  __pyx_t_1 = (__pyx_v_self->free_data != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":216
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape,
 *                                           self._strides, self.ndim, False)
 */
    __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":217
 *         elif self.free_data:
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape,             # <<<<<<<<<<<<<<
 *                                           self._strides, self.ndim, False)
 *             free(self.data)
 */
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);

      /* "View.MemoryView":216
 *             self.callback_free_data(self.data)
 *         elif self.free_data:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 refcount_objects_in_slice(self.data, self._shape,
 *                                           self._strides, self.ndim, False)
 */
    }

    /* "View.MemoryView":219
 *                 refcount_objects_in_slice(self.data, self._shape,
 *                                           self._strides, self.ndim, False)
 *             free(self.data)             # <<<<<<<<<<<<<<
 *         PyObject_Free(self._shape)
 * 
 */
    free(__pyx_v_self->data);

    /* "View.MemoryView":215
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 *         elif self.free_data:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 refcount_objects_in_slice(self.data, self._shape,
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":220
 *                                           self._strides, self.ndim, False)
 *             free(self.data)
 *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  PyObject_Free(__pyx_v_self->_shape);

  /* "View.MemoryView":212
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
 * 
 *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
 *         if self.callback_free_data != NULL:
 *             self.callback_free_data(self.data)
 */

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

/* "View.MemoryView":223
 * 
 *     @property
 *     def memview(self):             # <<<<<<<<<<<<<<
 *         return self.get_memview()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":224
 *     @property
 *     def memview(self):
 *         return self.get_memview()             # <<<<<<<<<<<<<<
 * 
 *     @cname('get_memview')
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":223
 * 
 *     @property
 *     def memview(self):             # <<<<<<<<<<<<<<
 *         return self.get_memview()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":227
 * 
 *     @cname('get_memview')
 *     cdef get_memview(self):             # <<<<<<<<<<<<<<
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)
 */

static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_memview", 0);

  /* "View.MemoryView":228
 *     @cname('get_memview')
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 */
  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);

  /* "View.MemoryView":229
 *     cdef get_memview(self):
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __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;
  goto __pyx_L0;

  /* "View.MemoryView":227
 * 
 *     @cname('get_memview')
 *     cdef get_memview(self):             # <<<<<<<<<<<<<<
 *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
 *         return  memoryview(self, flags, self.dtype_is_object)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":231
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));

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

static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "View.MemoryView":232
 * 
 *     def __len__(self):
 *         return self._shape[0]             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, attr):
 */
  __pyx_r = (__pyx_v_self->_shape[0]);
  goto __pyx_L0;

  /* "View.MemoryView":231
 *         return  memoryview(self, flags, self.dtype_is_object)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._shape[0]
 * 
 */

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

/* "View.MemoryView":234
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));

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

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "View.MemoryView":235
 * 
 *     def __getattr__(self, attr):
 *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, item):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":234
 *         return self._shape[0]
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.memview, attr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":237
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));

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

static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "View.MemoryView":238
 * 
 *     def __getitem__(self, item):
 *         return self.memview[item]             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, item, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":237
 *         return getattr(self.memview, attr)
 * 
 *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
 *         return self.memview[item]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":240
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
 */

/* Python wrapper */
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));

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

static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "View.MemoryView":241
 * 
 *     def __setitem__(self, item, value):
 *         self.memview[item] = value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 241, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "View.MemoryView":240
 *         return self.memview[item]
 * 
 *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
 *         self.memview[item] = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef___pyx_array_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw___pyx_array_1__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___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef___pyx_array_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw___pyx_array_3__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___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":245
 * 
 * @cname("__pyx_array_new")
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
 *                           char *mode, char *buf):
 *     cdef array result
 */

static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
  struct __pyx_array_obj *__pyx_v_result = 0;
  struct __pyx_array_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_cwrapper", 0);

  /* "View.MemoryView":249
 *     cdef array result
 * 
 *     if buf == NULL:             # <<<<<<<<<<<<<<
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":250
 * 
 *     if buf == NULL:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))             # <<<<<<<<<<<<<<
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),
 */
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":249
 *     cdef array result
 * 
 *     if buf == NULL:             # <<<<<<<<<<<<<<
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":252
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
 *                        allocate_buffer=False)
 *         result.data = buf
 */
  /*else*/ {
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_shape);
    __Pyx_GIVEREF(__pyx_v_shape);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;

    /* "View.MemoryView":253
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),
 *                        allocate_buffer=False)             # <<<<<<<<<<<<<<
 *         result.data = buf
 * 
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 253, __pyx_L1_error)

    /* "View.MemoryView":252
 *         result = array(shape, itemsize, format, mode.decode('ASCII'))
 *     else:
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),             # <<<<<<<<<<<<<<
 *                        allocate_buffer=False)
 *         result.data = buf
 */
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "View.MemoryView":254
 *         result = array(shape, itemsize, format, mode.decode('ASCII'),
 *                        allocate_buffer=False)
 *         result.data = buf             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_v_result->data = __pyx_v_buf;
  }
  __pyx_L3:;

  /* "View.MemoryView":256
 *         result.data = buf
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":245
 * 
 * @cname("__pyx_array_new")
 * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format,             # <<<<<<<<<<<<<<
 *                           char *mode, char *buf):
 *     cdef array result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":282
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
 */

/* Python wrapper */
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 282, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 282, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);

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

static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "View.MemoryView":283
 *     cdef object name
 *     def __init__(self, name):
 *         self.name = name             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return self.name
 */
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_name;

  /* "View.MemoryView":282
 * cdef class Enum(object):
 *     cdef object name
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *     def __repr__(self):
 */

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

/* "View.MemoryView":284
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

/* Python wrapper */
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

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

static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":285
 *         self.name = name
 *     def __repr__(self):
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "View.MemoryView":284
 *     def __init__(self, name):
 *         self.name = name
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef___pyx_MemviewEnum_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw___pyx_MemviewEnum_1__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___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.name,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->name);
  __Pyx_GIVEREF(__pyx_v_self->name);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

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

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.name is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.name,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->name != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.name is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_184977713);
    __Pyx_GIVEREF(__pyx_int_184977713);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.name is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_184977713);
    __Pyx_GIVEREF(__pyx_int_184977713);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef___pyx_MemviewEnum_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw___pyx_MemviewEnum_3__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___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":299
 * 
 * @cname('__pyx_align_pointer')
 * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
 *     "Align pointer memory on a given boundary"
 *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
 */

static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
  Py_intptr_t __pyx_v_aligned_p;
  size_t __pyx_v_offset;
  void *__pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":301
 * cdef void *align_pointer(void *memory, size_t alignment) nogil:
 *     "Align pointer memory on a given boundary"
 *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory             # <<<<<<<<<<<<<<
 *     cdef size_t offset
 * 
 */
  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);

  /* "View.MemoryView":305
 * 
 *     with cython.cdivision(True):
 *         offset = aligned_p % alignment             # <<<<<<<<<<<<<<
 * 
 *     if offset > 0:
 */
  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);

  /* "View.MemoryView":307
 *         offset = aligned_p % alignment
 * 
 *     if offset > 0:             # <<<<<<<<<<<<<<
 *         aligned_p += alignment - offset
 * 
 */
  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":308
 * 
 *     if offset > 0:
 *         aligned_p += alignment - offset             # <<<<<<<<<<<<<<
 * 
 *     return <void *> aligned_p
 */
    __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));

    /* "View.MemoryView":307
 *         offset = aligned_p % alignment
 * 
 *     if offset > 0:             # <<<<<<<<<<<<<<
 *         aligned_p += alignment - offset
 * 
 */
  }

  /* "View.MemoryView":310
 *         aligned_p += alignment - offset
 * 
 *     return <void *> aligned_p             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((void *)__pyx_v_aligned_p);
  goto __pyx_L0;

  /* "View.MemoryView":299
 * 
 * @cname('__pyx_align_pointer')
 * cdef void *align_pointer(void *memory, size_t alignment) nogil:             # <<<<<<<<<<<<<<
 *     "Align pointer memory on a given boundary"
 *     cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":346
 *     cdef __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
 */

/* Python wrapper */
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 0;
  int __pyx_v_flags;
  int __pyx_v_dtype_is_object;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,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_obj)) != 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_flags)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 346, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 346, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
    __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 346, __pyx_L3_error)
    if (values[2]) {
      __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 346, __pyx_L3_error)
    } else {
      __pyx_v_dtype_is_object = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 346, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);

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

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "View.MemoryView":347
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj             # <<<<<<<<<<<<<<
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 */
  __Pyx_INCREF(__pyx_v_obj);
  __Pyx_GIVEREF(__pyx_v_obj);
  __Pyx_GOTREF(__pyx_v_self->obj);
  __Pyx_DECREF(__pyx_v_self->obj);
  __pyx_v_self->obj = __pyx_v_obj;

  /* "View.MemoryView":348
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
 *         self.obj = obj
 *         self.flags = flags             # <<<<<<<<<<<<<<
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 */
  __pyx_v_self->flags = __pyx_v_flags;

  /* "View.MemoryView":349
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 */
  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (__pyx_v_obj != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "View.MemoryView":350
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 */
    __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 350, __pyx_L1_error)

    /* "View.MemoryView":351
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
 */
    __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":352
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
 *                 Py_INCREF(Py_None)
 * 
 */
      ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;

      /* "View.MemoryView":353
 *             if <PyObject *> self.view.obj == NULL:
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 */
      Py_INCREF(Py_None);

      /* "View.MemoryView":351
 *         if type(self) is memoryview or obj is not None:
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
 *                 (<__pyx_buffer *> &self.view).obj = Py_None
 *                 Py_INCREF(Py_None)
 */
    }

    /* "View.MemoryView":349
 *         self.obj = obj
 *         self.flags = flags
 *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_GetBuffer(obj, &self.view, flags)
 *             if <PyObject *> self.view.obj == NULL:
 */
  }

  /* "View.MemoryView":355
 *                 Py_INCREF(Py_None)
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
 */
  __pyx_t_1 = ((!(__PYX_CYTHON_ATOMICS_ENABLED() != 0)) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":357
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 */
    __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":358
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:
 */
      __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);

      /* "View.MemoryView":359
 *             if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 */
      __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);

      /* "View.MemoryView":357
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:             # <<<<<<<<<<<<<<
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 */
    }

    /* "View.MemoryView":360
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
 */
    __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":361
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
 *                 if self.lock is NULL:
 *                     raise MemoryError
 */
      __pyx_v_self->lock = PyThread_allocate_lock();

      /* "View.MemoryView":362
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError
 * 
 */
      __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
      if (unlikely(__pyx_t_1)) {

        /* "View.MemoryView":363
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
 *                     raise MemoryError             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
        PyErr_NoMemory(); __PYX_ERR(1, 363, __pyx_L1_error)

        /* "View.MemoryView":362
 *             if self.lock is NULL:
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                     raise MemoryError
 * 
 */
      }

      /* "View.MemoryView":360
 *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
 *                 __pyx_memoryview_thread_locks_used += 1
 *             if self.lock is NULL:             # <<<<<<<<<<<<<<
 *                 self.lock = PyThread_allocate_lock()
 *                 if self.lock is NULL:
 */
    }

    /* "View.MemoryView":355
 *                 Py_INCREF(Py_None)
 * 
 *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
 *             global __pyx_memoryview_thread_locks_used
 *             if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
 */
  }

  /* "View.MemoryView":365
 *                     raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":366
 * 
 *         if flags & PyBUF_FORMAT:
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
 *         else:
 *             self.dtype_is_object = dtype_is_object
 */
    __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L12_bool_binop_done:;
    __pyx_v_self->dtype_is_object = __pyx_t_1;

    /* "View.MemoryView":365
 *                     raise MemoryError
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 */
    goto __pyx_L11;
  }

  /* "View.MemoryView":368
 *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
 *         else:
 *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
 * 
 *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
 */
  /*else*/ {
    __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
  }
  __pyx_L11:;

  /* "View.MemoryView":370
 *             self.dtype_is_object = dtype_is_object
 * 
 *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(             # <<<<<<<<<<<<<<
 *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
 *         self.typeinfo = NULL
 */
  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));

  /* "View.MemoryView":372
 *         self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
 *                   <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
 *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(memoryview self):
 */
  __pyx_v_self->typeinfo = NULL;

  /* "View.MemoryView":346
 *     cdef __Pyx_TypeInfo *typeinfo
 * 
 *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
 *         self.obj = obj
 *         self.flags = flags
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":374
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 */

/* Python wrapper */
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
  int __pyx_v_i;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyThread_type_lock __pyx_t_6;
  PyThread_type_lock __pyx_t_7;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "View.MemoryView":375
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 */
  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":376
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
 */
    __Pyx_ReleaseBuffer((&__pyx_v_self->view));

    /* "View.MemoryView":375
 * 
 *     def __dealloc__(memoryview self):
 *         if self.obj is not None:             # <<<<<<<<<<<<<<
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":377
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 */
  __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":379
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
 *             Py_DECREF(Py_None)
 * 
 */
    ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;

    /* "View.MemoryView":380
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *         cdef int i
 */
    Py_DECREF(Py_None);

    /* "View.MemoryView":377
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
 * 
 *             (<__pyx_buffer *> &self.view).obj = NULL
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":384
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 */
  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":385
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 */
    __pyx_t_3 = __pyx_memoryview_thread_locks_used;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "View.MemoryView":386
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 */
      __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":387
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 */
        __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);

        /* "View.MemoryView":388
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 */
        __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":390
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
 *                     break
 *             else:
 */
          __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
          __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);

          /* "View.MemoryView":389
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break
 */
          (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
          (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;

          /* "View.MemoryView":388
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 */
        }

        /* "View.MemoryView":391
 *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
 *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
 *                     break             # <<<<<<<<<<<<<<
 *             else:
 *                 PyThread_free_lock(self.lock)
 */
        goto __pyx_L6_break;

        /* "View.MemoryView":386
 *         if self.lock != NULL:
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
 *                     __pyx_memoryview_thread_locks_used -= 1
 *                     if i != __pyx_memoryview_thread_locks_used:
 */
      }
    }
    /*else*/ {

      /* "View.MemoryView":393
 *                     break
 *             else:
 *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 */
      PyThread_free_lock(__pyx_v_self->lock);
    }
    __pyx_L6_break:;

    /* "View.MemoryView":384
 *         cdef int i
 *         global __pyx_memoryview_thread_locks_used
 *         if self.lock != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(__pyx_memoryview_thread_locks_used):
 *                 if __pyx_memoryview_thread_locks[i] is self.lock:
 */
  }

  /* "View.MemoryView":374
 *         self.typeinfo = NULL
 * 
 *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
 *         if self.obj is not None:
 *             __Pyx_ReleaseBuffer(&self.view)
 */

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

/* "View.MemoryView":395
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
 */

static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  Py_ssize_t __pyx_v_dim;
  char *__pyx_v_itemp;
  PyObject *__pyx_v_idx = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item_pointer", 0);

  /* "View.MemoryView":397
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
 * 
 *         for dim, idx in enumerate(index):
 */
  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);

  /* "View.MemoryView":399
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 */
  __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 399, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 399, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 399, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 399, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_v_dim = __pyx_t_1;
    __pyx_t_1 = (__pyx_t_1 + 1);

    /* "View.MemoryView":400
 * 
 *         for dim, idx in enumerate(index):
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
 * 
 *         return itemp
 */
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 400, __pyx_L1_error)
    __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 400, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_7;

    /* "View.MemoryView":399
 *         cdef char *itemp = <char *> self.view.buf
 * 
 *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":402
 *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
 * 
 *         return itemp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_itemp;
  goto __pyx_L0;

  /* "View.MemoryView":395
 *                 PyThread_free_lock(self.lock)
 * 
 *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t dim
 *         cdef char *itemp = <char *> self.view.buf
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":405
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_indices = NULL;
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "View.MemoryView":406
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":407
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:
 *             return self             # <<<<<<<<<<<<<<
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __pyx_r = ((PyObject *)__pyx_v_self);
    goto __pyx_L0;

    /* "View.MemoryView":406
 * 
 *     def __getitem__(memoryview self, object index):
 *         if index is Ellipsis:             # <<<<<<<<<<<<<<
 *             return self
 * 
 */
  }

  /* "View.MemoryView":409
 *             return self
 * 
 *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         cdef char *itemp
 */
  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(__pyx_t_3 != Py_None)) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 409, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_5 = PyTuple_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(1, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 409, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_indices = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "View.MemoryView":412
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 412, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "View.MemoryView":413
 *         cdef char *itemp
 *         if have_slices:
 *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
 *         else:
 *             itemp = self.get_item_pointer(indices)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":412
 * 
 *         cdef char *itemp
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             return memview_slice(self, indices)
 *         else:
 */
  }

  /* "View.MemoryView":415
 *             return memview_slice(self, indices)
 *         else:
 *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
 *             return self.convert_item_to_object(itemp)
 * 
 */
  /*else*/ {
    __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(1, 415, __pyx_L1_error)
    __pyx_v_itemp = __pyx_t_6;

    /* "View.MemoryView":416
 *         else:
 *             itemp = self.get_item_pointer(indices)
 *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(memoryview self, object index, object value):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":405
 * 
 * 
 *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
 *         if index is Ellipsis:
 *             return self
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_indices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":418
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")
 */

/* Python wrapper */
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

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

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_have_slices = NULL;
  PyObject *__pyx_v_obj = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "View.MemoryView":419
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError("Cannot assign to read-only memoryview")
 * 
 */
  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":420
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 420, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 420, __pyx_L1_error)

    /* "View.MemoryView":419
 * 
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise TypeError("Cannot assign to read-only memoryview")
 * 
 */
  }

  /* "View.MemoryView":422
 *             raise TypeError("Cannot assign to read-only memoryview")
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *         if have_slices:
 */
  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(__pyx_t_2 != Py_None)) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(1, 422, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
    __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 422, __pyx_L1_error)
  }
  __pyx_v_have_slices = __pyx_t_3;
  __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "View.MemoryView":424
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 424, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "View.MemoryView":425
 * 
 *         if have_slices:
 *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
 *             if obj:
 *                 self.setitem_slice_assignment(self[index], obj)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_obj = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "View.MemoryView":426
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 426, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "View.MemoryView":427
 *             obj = self.is_slice(value)
 *             if obj:
 *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)
 */
      __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 427, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 427, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "View.MemoryView":426
 *         if have_slices:
 *             obj = self.is_slice(value)
 *             if obj:             # <<<<<<<<<<<<<<
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "View.MemoryView":429
 *                 self.setitem_slice_assignment(self[index], obj)
 *             else:
 *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
 *         else:
 *             self.setitem_indexed(index, value)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 429, __pyx_L1_error)
      __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __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;
    }
    __pyx_L5:;

    /* "View.MemoryView":424
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 * 
 *         if have_slices:             # <<<<<<<<<<<<<<
 *             obj = self.is_slice(value)
 *             if obj:
 */
    goto __pyx_L4;
  }

  /* "View.MemoryView":431
 *                 self.setitem_slice_assign_scalar(self[index], value)
 *         else:
 *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef is_slice(self, obj):
 */
  /*else*/ {
    __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "View.MemoryView":418
 *             return self.convert_item_to_object(itemp)
 * 
 *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_have_slices);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":433
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
 */

static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_slice", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "View.MemoryView":434
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":435
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "View.MemoryView":436
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
 */
        __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 436, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_6);

        /* "View.MemoryView":437
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
 *             except TypeError:
 *                 return None
 */
        __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 437, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);

        /* "View.MemoryView":436
 *         if not isinstance(obj, memoryview):
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
 *                                  self.dtype_is_object)
 *             except TypeError:
 */
        __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 436, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_obj);
        __Pyx_GIVEREF(__pyx_v_obj);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
        __pyx_t_6 = 0;
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 436, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "View.MemoryView":435
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "View.MemoryView":438
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 *             except TypeError:             # <<<<<<<<<<<<<<
 *                 return None
 * 
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 438, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_6);

        /* "View.MemoryView":439
 *                                  self.dtype_is_object)
 *             except TypeError:
 *                 return None             # <<<<<<<<<<<<<<
 * 
 *         return obj
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "View.MemoryView":435
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):
 *             try:             # <<<<<<<<<<<<<<
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 *                                  self.dtype_is_object)
 */
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L9_try_end:;
    }

    /* "View.MemoryView":434
 * 
 *     cdef is_slice(self, obj):
 *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
 *             try:
 *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
 */
  }

  /* "View.MemoryView":441
 *                 return None
 * 
 *         return obj             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assignment(self, dst, src):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_r = __pyx_v_obj;
  goto __pyx_L0;

  /* "View.MemoryView":433
 *             self.setitem_indexed(index, value)
 * 
 *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
 *         if not isinstance(obj, memoryview):
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":443
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 */

static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
  __Pyx_memviewslice __pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_src_slice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  __Pyx_memviewslice *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);

  /* "View.MemoryView":447
 *         cdef __Pyx_memviewslice src_slice
 * 
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
 *                                  get_slice_from_memview(dst, &dst_slice)[0],
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 */
  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 447, __pyx_L1_error)
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 447, __pyx_L1_error)

  /* "View.MemoryView":448
 * 
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
 *                                  get_slice_from_memview(dst, &dst_slice)[0],             # <<<<<<<<<<<<<<
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 * 
 */
  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
  __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)

  /* "View.MemoryView":449
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
 *                                  get_slice_from_memview(dst, &dst_slice)[0],
 *                                  src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":447
 *         cdef __Pyx_memviewslice src_slice
 * 
 *         memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],             # <<<<<<<<<<<<<<
 *                                  get_slice_from_memview(dst, &dst_slice)[0],
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 */
  __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 447, __pyx_L1_error)

  /* "View.MemoryView":443
 *         return obj
 * 
 *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice dst_slice
 *         cdef __Pyx_memviewslice src_slice
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":451
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
 */

static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
  int __pyx_v_array[0x80];
  void *__pyx_v_tmp;
  void *__pyx_v_item;
  __Pyx_memviewslice *__pyx_v_dst_slice;
  __Pyx_memviewslice __pyx_v_tmp_slice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);

  /* "View.MemoryView":453
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
 *         cdef int array[128]
 *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
 *         cdef void *item
 * 
 */
  __pyx_v_tmp = NULL;

  /* "View.MemoryView":458
 *         cdef __Pyx_memviewslice *dst_slice
 *         cdef __Pyx_memviewslice tmp_slice
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 */
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 458, __pyx_L1_error)
  __pyx_v_dst_slice = __pyx_t_1;

  /* "View.MemoryView":460
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 */
  __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":461
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
 *             if tmp == NULL:
 *                 raise MemoryError
 */
    __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);

    /* "View.MemoryView":462
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
 */
    __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":463
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 *                 raise MemoryError             # <<<<<<<<<<<<<<
 *             item = tmp
 *         else:
 */
      PyErr_NoMemory(); __PYX_ERR(1, 463, __pyx_L1_error)

      /* "View.MemoryView":462
 *         if <size_t>self.view.itemsize > sizeof(array):
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:             # <<<<<<<<<<<<<<
 *                 raise MemoryError
 *             item = tmp
 */
    }

    /* "View.MemoryView":464
 *             if tmp == NULL:
 *                 raise MemoryError
 *             item = tmp             # <<<<<<<<<<<<<<
 *         else:
 *             item = <void *> array
 */
    __pyx_v_item = __pyx_v_tmp;

    /* "View.MemoryView":460
 *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
 * 
 *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
 *             tmp = PyMem_Malloc(self.view.itemsize)
 *             if tmp == NULL:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":466
 *             item = tmp
 *         else:
 *             item = <void *> array             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  /*else*/ {
    __pyx_v_item = ((void *)__pyx_v_array);
  }
  __pyx_L3:;

  /* "View.MemoryView":468
 *             item = <void *> array
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value
 */
  /*try:*/ {

    /* "View.MemoryView":469
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 */
    __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":470
 *         try:
 *             if self.dtype_is_object:
 *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)
 */
      (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);

      /* "View.MemoryView":469
 * 
 *         try:
 *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 */
      goto __pyx_L8;
    }

    /* "View.MemoryView":472
 *                 (<PyObject **> item)[0] = <PyObject *> value
 *             else:
 *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 472, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L8:;

    /* "View.MemoryView":476
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 */
    __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":477
 * 
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 *                                 item, self.dtype_is_object)
 */
      __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 477, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "View.MemoryView":476
 * 
 * 
 *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
 */
    }

    /* "View.MemoryView":478
 *             if self.view.suboffsets != NULL:
 *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
 *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
 *                                 item, self.dtype_is_object)
 *         finally:
 */
    __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
  }

  /* "View.MemoryView":481
 *                                 item, self.dtype_is_object)
 *         finally:
 *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
 * 
 *     cdef setitem_indexed(self, index, value):
 */
  /*finally:*/ {
    /*normal exit:*/{
      PyMem_Free(__pyx_v_tmp);
      goto __pyx_L7;
    }
    __pyx_L6_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
      {
        PyMem_Free(__pyx_v_tmp);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
      goto __pyx_L1_error;
    }
    __pyx_L7:;
  }

  /* "View.MemoryView":451
 *                                  src.ndim, dst.ndim, self.dtype_is_object)
 * 
 *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
 *         cdef int array[128]
 *         cdef void *tmp = NULL
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":483
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
 */

static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  char *__pyx_v_itemp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setitem_indexed", 0);

  /* "View.MemoryView":484
 * 
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
 *         self.assign_item_from_object(itemp, value)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 484, __pyx_L1_error)
  __pyx_v_itemp = __pyx_t_1;

  /* "View.MemoryView":485
 *     cdef setitem_indexed(self, index, value):
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":483
 *             PyMem_Free(tmp)
 * 
 *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
 *         cdef char *itemp = self.get_item_pointer(index)
 *         self.assign_item_from_object(itemp, value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":487
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_v_struct = NULL;
  PyObject *__pyx_v_bytesitem = 0;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":490
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef bytes bytesitem
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":493
 *         cdef bytes bytesitem
 * 
 *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":494
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "View.MemoryView":495
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
 *         except struct.error:
 *             raise ValueError("Unable to convert item to object")
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 495, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 495, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      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);
          __pyx_t_8 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 495, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
        __Pyx_INCREF(__pyx_v_bytesitem);
        __Pyx_GIVEREF(__pyx_v_bytesitem);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "View.MemoryView":494
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
    }

    /* "View.MemoryView":499
 *             raise ValueError("Unable to convert item to object")
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
 */
    /*else:*/ {
      __pyx_t_10 = strlen(__pyx_v_self->view.format); 
      __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
      if (__pyx_t_11) {

        /* "View.MemoryView":500
 *         else:
 *             if len(self.view.format) == 1:
 *                 return result[0]             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L6_except_return;

        /* "View.MemoryView":499
 *             raise ValueError("Unable to convert item to object")
 *         else:
 *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
 *                 return result[0]
 *             return result
 */
      }

      /* "View.MemoryView":501
 *             if len(self.view.format) == 1:
 *                 return result[0]
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L6_except_return;
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "View.MemoryView":496
 *         try:
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:             # <<<<<<<<<<<<<<
 *             raise ValueError("Unable to convert item to object")
 *         else:
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 496, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
    __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 496, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);

      /* "View.MemoryView":497
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
 *         else:
 *             if len(self.view.format) == 1:
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(1, 497, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "View.MemoryView":494
 * 
 *         bytesitem = itemp[:self.view.itemsize]
 *         try:             # <<<<<<<<<<<<<<
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "View.MemoryView":487
 *         self.assign_item_from_object(itemp, value)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesitem);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":503
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_struct = NULL;
  char __pyx_v_c;
  PyObject *__pyx_v_bytesvalue = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  char *__pyx_t_11;
  char *__pyx_t_12;
  char *__pyx_t_13;
  char *__pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":506
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 *         import struct             # <<<<<<<<<<<<<<
 *         cdef char c
 *         cdef bytes bytesvalue
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_struct = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "View.MemoryView":511
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 */
  __pyx_t_2 = PyTuple_Check(__pyx_v_value); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "View.MemoryView":512
 * 
 *         if isinstance(value, tuple):
 *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 512, __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 = 0;
    __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 512, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "View.MemoryView":511
 *         cdef Py_ssize_t i
 * 
 *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":514
 *             bytesvalue = struct.pack(self.view.format, *value)
 *         else:
 *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
 * 
 *         for i, c in enumerate(bytesvalue):
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_6)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __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[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 514, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
      __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 514, __pyx_L1_error)
    __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":516
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
 */
  __pyx_t_9 = 0;
  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    __PYX_ERR(1, 516, __pyx_L1_error)
  }
  __Pyx_INCREF(__pyx_v_bytesvalue);
  __pyx_t_10 = __pyx_v_bytesvalue;
  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
    __pyx_t_11 = __pyx_t_14;
    __pyx_v_c = (__pyx_t_11[0]);

    /* "View.MemoryView":517
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
    __pyx_v_i = __pyx_t_9;

    /* "View.MemoryView":516
 *             bytesvalue = struct.pack(self.view.format, value)
 * 
 *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
 *             itemp[i] = c
 * 
 */
    __pyx_t_9 = (__pyx_t_9 + 1);

    /* "View.MemoryView":517
 * 
 *         for i, c in enumerate(bytesvalue):
 *             itemp[i] = c             # <<<<<<<<<<<<<<
 * 
 *     @cname('getbuffer')
 */
    (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "View.MemoryView":503
 *             return result
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         """Only used if instantiated manually by the user, or if Cython doesn't
 *         know how to convert the type"""
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_struct);
  __Pyx_XDECREF(__pyx_v_bytesvalue);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":520
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

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

static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t *__pyx_t_4;
  char *__pyx_t_5;
  void *__pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "View.MemoryView":521
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 */
  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":522
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_ND:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 522, __pyx_L1_error)

    /* "View.MemoryView":521
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 */
  }

  /* "View.MemoryView":524
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":525
 * 
 *         if flags & PyBUF_ND:
 *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
 *         else:
 *             info.shape = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.shape;
    __pyx_v_info->shape = __pyx_t_4;

    /* "View.MemoryView":524
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 * 
 *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
 *             info.shape = self.view.shape
 *         else:
 */
    goto __pyx_L6;
  }

  /* "View.MemoryView":527
 *             info.shape = self.view.shape
 *         else:
 *             info.shape = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_STRIDES:
 */
  /*else*/ {
    __pyx_v_info->shape = NULL;
  }
  __pyx_L6:;

  /* "View.MemoryView":529
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":530
 * 
 *         if flags & PyBUF_STRIDES:
 *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
 *         else:
 *             info.strides = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.strides;
    __pyx_v_info->strides = __pyx_t_4;

    /* "View.MemoryView":529
 *             info.shape = NULL
 * 
 *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
 *             info.strides = self.view.strides
 *         else:
 */
    goto __pyx_L7;
  }

  /* "View.MemoryView":532
 *             info.strides = self.view.strides
 *         else:
 *             info.strides = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_INDIRECT:
 */
  /*else*/ {
    __pyx_v_info->strides = NULL;
  }
  __pyx_L7:;

  /* "View.MemoryView":534
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":535
 * 
 *         if flags & PyBUF_INDIRECT:
 *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
 *         else:
 *             info.suboffsets = NULL
 */
    __pyx_t_4 = __pyx_v_self->view.suboffsets;
    __pyx_v_info->suboffsets = __pyx_t_4;

    /* "View.MemoryView":534
 *             info.strides = NULL
 * 
 *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
 *             info.suboffsets = self.view.suboffsets
 *         else:
 */
    goto __pyx_L8;
  }

  /* "View.MemoryView":537
 *             info.suboffsets = self.view.suboffsets
 *         else:
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_FORMAT:
 */
  /*else*/ {
    __pyx_v_info->suboffsets = NULL;
  }
  __pyx_L8:;

  /* "View.MemoryView":539
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":540
 * 
 *         if flags & PyBUF_FORMAT:
 *             info.format = self.view.format             # <<<<<<<<<<<<<<
 *         else:
 *             info.format = NULL
 */
    __pyx_t_5 = __pyx_v_self->view.format;
    __pyx_v_info->format = __pyx_t_5;

    /* "View.MemoryView":539
 *             info.suboffsets = NULL
 * 
 *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
 *             info.format = self.view.format
 *         else:
 */
    goto __pyx_L9;
  }

  /* "View.MemoryView":542
 *             info.format = self.view.format
 *         else:
 *             info.format = NULL             # <<<<<<<<<<<<<<
 * 
 *         info.buf = self.view.buf
 */
  /*else*/ {
    __pyx_v_info->format = NULL;
  }
  __pyx_L9:;

  /* "View.MemoryView":544
 *             info.format = NULL
 * 
 *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 */
  __pyx_t_6 = __pyx_v_self->view.buf;
  __pyx_v_info->buf = __pyx_t_6;

  /* "View.MemoryView":545
 * 
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 */
  __pyx_t_7 = __pyx_v_self->view.ndim;
  __pyx_v_info->ndim = __pyx_t_7;

  /* "View.MemoryView":546
 *         info.buf = self.view.buf
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 */
  __pyx_t_8 = __pyx_v_self->view.itemsize;
  __pyx_v_info->itemsize = __pyx_t_8;

  /* "View.MemoryView":547
 *         info.ndim = self.view.ndim
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len             # <<<<<<<<<<<<<<
 *         info.readonly = self.view.readonly
 *         info.obj = self
 */
  __pyx_t_8 = __pyx_v_self->view.len;
  __pyx_v_info->len = __pyx_t_8;

  /* "View.MemoryView":548
 *         info.itemsize = self.view.itemsize
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
 *         info.obj = self
 * 
 */
  __pyx_t_1 = __pyx_v_self->view.readonly;
  __pyx_v_info->readonly = __pyx_t_1;

  /* "View.MemoryView":549
 *         info.len = self.view.len
 *         info.readonly = self.view.readonly
 *         info.obj = self             # <<<<<<<<<<<<<<
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "View.MemoryView":520
 * 
 *     @cname('getbuffer')
 *     def __getbuffer__(self, Py_buffer *info, int flags):             # <<<<<<<<<<<<<<
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":555
 * 
 *     @property
 *     def T(self):             # <<<<<<<<<<<<<<
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":556
 *     @property
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&result.from_slice)
 *         return result
 */
  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "View.MemoryView":557
 *     def T(self):
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 557, __pyx_L1_error)

  /* "View.MemoryView":558
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":555
 * 
 *     @property
 *     def T(self):             # <<<<<<<<<<<<<<
 *         cdef _memoryviewslice result = memoryview_copy(self)
 *         transpose_memslice(&result.from_slice)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":561
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":562
 *     @property
 *     def base(self):
 *         return self.obj             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->obj);
  __pyx_r = __pyx_v_self->obj;
  goto __pyx_L0;

  /* "View.MemoryView":561
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.obj
 * 
 */

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

/* "View.MemoryView":565
 * 
 *     @property
 *     def shape(self):             # <<<<<<<<<<<<<<
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":566
 *     @property
 *     def shape(self):
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
    __pyx_t_2 = __pyx_t_4;
    __pyx_v_length = (__pyx_t_2[0]);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 566, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":565
 * 
 *     @property
 *     def shape(self):             # <<<<<<<<<<<<<<
 *         return tuple([length for length in self.view.shape[:self.view.ndim]])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":569
 * 
 *     @property
 *     def strides(self):             # <<<<<<<<<<<<<<
 *         if self.view.strides == NULL:
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_stride;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":570
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError("Buffer view does not expose strides")
 */
  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":572
 *         if self.view.strides == NULL:
 * 
 *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(1, 572, __pyx_L1_error)

    /* "View.MemoryView":570
 *     @property
 *     def strides(self):
 *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
 * 
 *             raise ValueError("Buffer view does not expose strides")
 */
  }

  /* "View.MemoryView":574
 *             raise ValueError("Buffer view does not expose strides")
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
    __pyx_t_3 = __pyx_t_5;
    __pyx_v_stride = (__pyx_t_3[0]);
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 574, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":569
 * 
 *     @property
 *     def strides(self):             # <<<<<<<<<<<<<<
 *         if self.view.strides == NULL:
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":577
 * 
 *     @property
 *     def suboffsets(self):             # <<<<<<<<<<<<<<
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  Py_ssize_t *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":578
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":579
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__42, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":578
 *     @property
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
 *             return (-1,) * self.view.ndim
 * 
 */
  }

  /* "View.MemoryView":581
 *             return (-1,) * self.view.ndim
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
    __pyx_t_4 = __pyx_t_6;
    __pyx_v_suboffset = (__pyx_t_4[0]);
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 581, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __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;
  goto __pyx_L0;

  /* "View.MemoryView":577
 * 
 *     @property
 *     def suboffsets(self):             # <<<<<<<<<<<<<<
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":584
 * 
 *     @property
 *     def ndim(self):             # <<<<<<<<<<<<<<
 *         return self.view.ndim
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":585
 *     @property
 *     def ndim(self):
 *         return self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":584
 * 
 *     @property
 *     def ndim(self):             # <<<<<<<<<<<<<<
 *         return self.view.ndim
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":588
 * 
 *     @property
 *     def itemsize(self):             # <<<<<<<<<<<<<<
 *         return self.view.itemsize
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":589
 *     @property
 *     def itemsize(self):
 *         return self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":588
 * 
 *     @property
 *     def itemsize(self):             # <<<<<<<<<<<<<<
 *         return self.view.itemsize
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":592
 * 
 *     @property
 *     def nbytes(self):             # <<<<<<<<<<<<<<
 *         return self.size * self.view.itemsize
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":593
 *     @property
 *     def nbytes(self):
 *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":592
 * 
 *     @property
 *     def nbytes(self):             # <<<<<<<<<<<<<<
 *         return self.size * self.view.itemsize
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":596
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         if self._size is None:
 *             result = 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;
  Py_ssize_t *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":597
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":598
 *     def size(self):
 *         if self._size is None:
 *             result = 1             # <<<<<<<<<<<<<<
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 */
    __Pyx_INCREF(__pyx_int_1);
    __pyx_v_result = __pyx_int_1;

    /* "View.MemoryView":600
 *             result = 1
 * 
 *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
 *                 result *= length
 * 
 */
    __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
    for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
      __pyx_t_3 = __pyx_t_5;
      __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "View.MemoryView":601
 * 
 *             for length in self.view.shape[:self.view.ndim]:
 *                 result *= length             # <<<<<<<<<<<<<<
 * 
 *             self._size = result
 */
      __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
      __pyx_t_6 = 0;
    }

    /* "View.MemoryView":603
 *                 result *= length
 * 
 *             self._size = result             # <<<<<<<<<<<<<<
 * 
 *         return self._size
 */
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    __Pyx_GOTREF(__pyx_v_self->_size);
    __Pyx_DECREF(__pyx_v_self->_size);
    __pyx_v_self->_size = __pyx_v_result;

    /* "View.MemoryView":597
 *     @property
 *     def size(self):
 *         if self._size is None:             # <<<<<<<<<<<<<<
 *             result = 1
 * 
 */
  }

  /* "View.MemoryView":605
 *             self._size = result
 * 
 *         return self._size             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_size);
  __pyx_r = __pyx_v_self->_size;
  goto __pyx_L0;

  /* "View.MemoryView":596
 * 
 *     @property
 *     def size(self):             # <<<<<<<<<<<<<<
 *         if self._size is None:
 *             result = 1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":607
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
 */

/* Python wrapper */
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "View.MemoryView":608
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":609
 *     def __len__(self):
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]             # <<<<<<<<<<<<<<
 * 
 *         return 0
 */
    __pyx_r = (__pyx_v_self->view.shape[0]);
    goto __pyx_L0;

    /* "View.MemoryView":608
 * 
 *     def __len__(self):
 *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
 *             return self.view.shape[0]
 * 
 */
  }

  /* "View.MemoryView":611
 *             return self.view.shape[0]
 * 
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":607
 *         return self._size
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         if self.view.ndim >= 1:
 *             return self.view.shape[0]
 */

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

/* "View.MemoryView":613
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "View.MemoryView":614
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __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_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "View.MemoryView":615
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "View.MemoryView":614
 * 
 *     def __repr__(self):
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
 *                                                id(self))
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __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;
  goto __pyx_L0;

  /* "View.MemoryView":613
 *         return 0
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
 *                                                id(self))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":617
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "View.MemoryView":618
 * 
 *     def __str__(self):
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __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_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":617
 *                                                id(self))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":621
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_17is_c_contig = {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0};
static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_c_contig", 0);

  /* "View.MemoryView":624
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 */
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 624, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":625
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def is_f_contig(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":621
 * 
 * 
 *     def is_c_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":627
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_19is_f_contig = {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0};
static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice *__pyx_v_mslice;
  __Pyx_memviewslice __pyx_v_tmp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_f_contig", 0);

  /* "View.MemoryView":630
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 */
  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 630, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":631
 *         cdef __Pyx_memviewslice tmp
 *         mslice = get_slice_from_memview(self, &tmp)
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":627
 *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
 * 
 *     def is_f_contig(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice *mslice
 *         cdef __Pyx_memviewslice tmp
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":633
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_21copy = {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0};
static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_mslice;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "View.MemoryView":635
 *     def copy(self):
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &mslice)
 */
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));

  /* "View.MemoryView":637
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 * 
 *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
 *                                    self.view.itemsize,
 */
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));

  /* "View.MemoryView":638
 * 
 *         slice_copy(self, &mslice)
 *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                    self.view.itemsize,
 *                                    flags|PyBUF_C_CONTIGUOUS,
 */
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 638, __pyx_L1_error)
  __pyx_v_mslice = __pyx_t_1;

  /* "View.MemoryView":643
 *                                    self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
 * 
 *     def copy_fortran(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":633
 *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice mslice
 *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":645
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 */

/* Python wrapper */
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_23copy_fortran = {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0};
static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  int __pyx_v_flags;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_memviewslice __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy_fortran", 0);

  /* "View.MemoryView":647
 *     def copy_fortran(self):
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
 * 
 *         slice_copy(self, &src)
 */
  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));

  /* "View.MemoryView":649
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 * 
 *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
 *                                 self.view.itemsize,
 */
  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));

  /* "View.MemoryView":650
 * 
 *         slice_copy(self, &src)
 *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
 *                                 self.view.itemsize,
 *                                 flags|PyBUF_F_CONTIGUOUS,
 */
  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 650, __pyx_L1_error)
  __pyx_v_dst = __pyx_t_1;

  /* "View.MemoryView":655
 *                                 self.dtype_is_object)
 * 
 *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":645
 *         return memoryview_copy_from_slice(self, &mslice)
 * 
 *     def copy_fortran(self):             # <<<<<<<<<<<<<<
 *         cdef __Pyx_memviewslice src, dst
 *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef___pyx_memoryview_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw___pyx_memoryview_1__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___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef___pyx_memoryview_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw___pyx_memoryview_3__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___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":659
 * 
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 */

static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
  struct __pyx_memoryview_obj *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);

  /* "View.MemoryView":660
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
 *     result.typeinfo = typeinfo
 *     return result
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_o);
  __Pyx_GIVEREF(__pyx_v_o);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":661
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_v_result->typeinfo = __pyx_v_typeinfo;

  /* "View.MemoryView":662
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_check')
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":659
 * 
 * @cname('__pyx_memoryview_new')
 * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
 *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
 *     result.typeinfo = typeinfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":665
 * 
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
 *     return isinstance(o, memoryview)
 * 
 */

static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("memoryview_check", 0);

  /* "View.MemoryView":666
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o):
 *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
 * 
 * cdef tuple _unellipsify(object index, int ndim):
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); 
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "View.MemoryView":665
 * 
 * @cname('__pyx_memoryview_check')
 * cdef inline bint memoryview_check(object o):             # <<<<<<<<<<<<<<
 *     return isinstance(o, memoryview)
 * 
 */

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

/* "View.MemoryView":668
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
 */

static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
  PyObject *__pyx_v_tup = NULL;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_have_slices;
  int __pyx_v_seen_ellipsis;
  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
  PyObject *__pyx_v_item = NULL;
  Py_ssize_t __pyx_v_nslices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unellipsify", 0);

  /* "View.MemoryView":673
 *     full slices.
 *     """
 *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
 *         tup = (index,)
 *     else:
 */
  __pyx_t_1 = PyTuple_Check(__pyx_v_index); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":674
 *     """
 *     if not isinstance(index, tuple):
 *         tup = (index,)             # <<<<<<<<<<<<<<
 *     else:
 *         tup = index
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
    __pyx_v_tup = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "View.MemoryView":673
 *     full slices.
 *     """
 *     if not isinstance(index, tuple):             # <<<<<<<<<<<<<<
 *         tup = (index,)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":676
 *         tup = (index,)
 *     else:
 *         tup = index             # <<<<<<<<<<<<<<
 * 
 *     result = []
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_index);
    __pyx_v_tup = __pyx_v_index;
  }
  __pyx_L3:;

  /* "View.MemoryView":678
 *         tup = index
 * 
 *     result = []             # <<<<<<<<<<<<<<
 *     have_slices = False
 *     seen_ellipsis = False
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_result = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "View.MemoryView":679
 * 
 *     result = []
 *     have_slices = False             # <<<<<<<<<<<<<<
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):
 */
  __pyx_v_have_slices = 0;

  /* "View.MemoryView":680
 *     result = []
 *     have_slices = False
 *     seen_ellipsis = False             # <<<<<<<<<<<<<<
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:
 */
  __pyx_v_seen_ellipsis = 0;

  /* "View.MemoryView":681
 *     have_slices = False
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_3 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
    __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 681, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 681, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 681, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_4);
      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(1, 681, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "View.MemoryView":682
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 */
    __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":683
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 *                 seen_ellipsis = True
 */
      __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
      if (__pyx_t_1) {

        /* "View.MemoryView":684
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))             # <<<<<<<<<<<<<<
 *                 seen_ellipsis = True
 *             else:
 */
        __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 684, __pyx_L1_error)
        __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 684, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        { Py_ssize_t __pyx_temp;
          for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
            __Pyx_INCREF(__pyx_slice__14);
            __Pyx_GIVEREF(__pyx_slice__14);
            PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__14);
          }
        }
        __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 684, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "View.MemoryView":685
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
 *             else:
 *                 result.append(slice(None))
 */
        __pyx_v_seen_ellipsis = 1;

        /* "View.MemoryView":683
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:
 *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 *                 seen_ellipsis = True
 */
        goto __pyx_L7;
      }

      /* "View.MemoryView":687
 *                 seen_ellipsis = True
 *             else:
 *                 result.append(slice(None))             # <<<<<<<<<<<<<<
 *             have_slices = True
 *         else:
 */
      /*else*/ {
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__14); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 687, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "View.MemoryView":688
 *             else:
 *                 result.append(slice(None))
 *             have_slices = True             # <<<<<<<<<<<<<<
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):
 */
      __pyx_v_have_slices = 1;

      /* "View.MemoryView":682
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):
 *         if item is Ellipsis:             # <<<<<<<<<<<<<<
 *             if not seen_ellipsis:
 *                 result.extend([slice(None)] * (ndim - len(tup) + 1))
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":690
 *             have_slices = True
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Cannot index with type '%s'" % type(item))
 * 
 */
    /*else*/ {
      __pyx_t_2 = PySlice_Check(__pyx_v_item); 
      __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
      if (__pyx_t_10) {
      } else {
        __pyx_t_1 = __pyx_t_10;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
      __pyx_t_1 = __pyx_t_10;
      __pyx_L9_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "View.MemoryView":691
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):
 *                 raise TypeError("Cannot index with type '%s'" % type(item))             # <<<<<<<<<<<<<<
 * 
 *             have_slices = have_slices or isinstance(item, slice)
 */
        __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(__pyx_t_11, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __PYX_ERR(1, 691, __pyx_L1_error)

        /* "View.MemoryView":690
 *             have_slices = True
 *         else:
 *             if not isinstance(item, slice) and not PyIndex_Check(item):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Cannot index with type '%s'" % type(item))
 * 
 */
      }

      /* "View.MemoryView":693
 *                 raise TypeError("Cannot index with type '%s'" % type(item))
 * 
 *             have_slices = have_slices or isinstance(item, slice)             # <<<<<<<<<<<<<<
 *             result.append(item)
 * 
 */
      __pyx_t_10 = (__pyx_v_have_slices != 0);
      if (!__pyx_t_10) {
      } else {
        __pyx_t_1 = __pyx_t_10;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_10 = PySlice_Check(__pyx_v_item); 
      __pyx_t_2 = (__pyx_t_10 != 0);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L11_bool_binop_done:;
      __pyx_v_have_slices = __pyx_t_1;

      /* "View.MemoryView":694
 * 
 *             have_slices = have_slices or isinstance(item, slice)
 *             result.append(item)             # <<<<<<<<<<<<<<
 * 
 *     nslices = ndim - len(result)
 */
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 694, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "View.MemoryView":681
 *     have_slices = False
 *     seen_ellipsis = False
 *     for idx, item in enumerate(tup):             # <<<<<<<<<<<<<<
 *         if item is Ellipsis:
 *             if not seen_ellipsis:
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":696
 *             result.append(item)
 * 
 *     nslices = ndim - len(result)             # <<<<<<<<<<<<<<
 *     if nslices:
 *         result.extend([slice(None)] * nslices)
 */
  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 696, __pyx_L1_error)
  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);

  /* "View.MemoryView":697
 * 
 *     nslices = ndim - len(result)
 *     if nslices:             # <<<<<<<<<<<<<<
 *         result.extend([slice(None)] * nslices)
 * 
 */
  __pyx_t_1 = (__pyx_v_nslices != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":698
 *     nslices = ndim - len(result)
 *     if nslices:
 *         result.extend([slice(None)] * nslices)             # <<<<<<<<<<<<<<
 * 
 *     return have_slices or nslices, tuple(result)
 */
    __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
        __Pyx_INCREF(__pyx_slice__14);
        __Pyx_GIVEREF(__pyx_slice__14);
        PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__14);
      }
    }
    __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 698, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "View.MemoryView":697
 * 
 *     nslices = ndim - len(result)
 *     if nslices:             # <<<<<<<<<<<<<<
 *         result.extend([slice(None)] * nslices)
 * 
 */
  }

  /* "View.MemoryView":700
 *         result.extend([slice(None)] * nslices)
 * 
 *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!__pyx_v_have_slices) {
  } else {
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_L14_bool_binop_done:;
  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = ((PyObject*)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":668
 *     return isinstance(o, memoryview)
 * 
 * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
 *     """
 *     Replace all ellipses with full slices and fill incomplete indices with
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":702
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 */

static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t *__pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);

  /* "View.MemoryView":703
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             raise ValueError("Indirect dimensions not supported")
 */
  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
    __pyx_t_1 = __pyx_t_3;
    __pyx_v_suboffset = (__pyx_t_1[0]);

    /* "View.MemoryView":704
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Indirect dimensions not supported")
 * 
 */
    __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "View.MemoryView":705
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(1, 705, __pyx_L1_error)

      /* "View.MemoryView":704
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("Indirect dimensions not supported")
 * 
 */
    }
  }

  /* "View.MemoryView":702
 *     return have_slices or nslices, tuple(result)
 * 
 * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):             # <<<<<<<<<<<<<<
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":712
 * 
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
 *     cdef bint negative_step
 */

static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
  int __pyx_v_new_ndim;
  int __pyx_v_suboffset_dim;
  int __pyx_v_dim;
  __Pyx_memviewslice __pyx_v_src;
  __Pyx_memviewslice __pyx_v_dst;
  __Pyx_memviewslice *__pyx_v_p_src;
  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
  __Pyx_memviewslice *__pyx_v_p_dst;
  int *__pyx_v_p_suboffset_dim;
  Py_ssize_t __pyx_v_start;
  Py_ssize_t __pyx_v_stop;
  Py_ssize_t __pyx_v_step;
  int __pyx_v_have_start;
  int __pyx_v_have_stop;
  int __pyx_v_have_step;
  PyObject *__pyx_v_index = NULL;
  struct __pyx_memoryview_obj *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  struct __pyx_memoryview_obj *__pyx_t_4;
  char *__pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memview_slice", 0);

  /* "View.MemoryView":713
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
 *     cdef bint negative_step
 *     cdef __Pyx_memviewslice src, dst
 */
  __pyx_v_new_ndim = 0;
  __pyx_v_suboffset_dim = -1;

  /* "View.MemoryView":720
 * 
 * 
 *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
 * 
 *     cdef _memoryviewslice memviewsliceobj
 */
  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));

  /* "View.MemoryView":724
 *     cdef _memoryviewslice memviewsliceobj
 * 
 *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(1, 724, __pyx_L1_error)
    }
  }
  #endif

  /* "View.MemoryView":726
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":727
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 */
    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 727, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":728
 *     if isinstance(memview, _memoryviewslice):
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, &src)
 */
    __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);

    /* "View.MemoryView":726
 *     assert memview.view.ndim > 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         memviewsliceobj = memview
 *         p_src = &memviewsliceobj.from_slice
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":730
 *         p_src = &memviewsliceobj.from_slice
 *     else:
 *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
 *         p_src = &src
 * 
 */
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));

    /* "View.MemoryView":731
 *     else:
 *         slice_copy(memview, &src)
 *         p_src = &src             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_p_src = (&__pyx_v_src);
  }
  __pyx_L3:;

  /* "View.MemoryView":737
 * 
 * 
 *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
 *     dst.data = p_src.data
 * 
 */
  __pyx_t_4 = __pyx_v_p_src->memview;
  __pyx_v_dst.memview = __pyx_t_4;

  /* "View.MemoryView":738
 * 
 *     dst.memview = p_src.memview
 *     dst.data = p_src.data             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __pyx_v_p_src->data;
  __pyx_v_dst.data = __pyx_t_5;

  /* "View.MemoryView":743
 * 
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
 *     cdef int *p_suboffset_dim = &suboffset_dim
 *     cdef Py_ssize_t start, stop, step
 */
  __pyx_v_p_dst = (&__pyx_v_dst);

  /* "View.MemoryView":744
 * 
 *     cdef __Pyx_memviewslice *p_dst = &dst
 *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t start, stop, step
 *     cdef bint have_start, have_stop, have_step
 */
  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);

  /* "View.MemoryView":748
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             slice_memviewslice(
 */
  __pyx_t_6 = 0;
  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
    __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 748, __pyx_L1_error)
  }
  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_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 748, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 748, __pyx_L1_error)
        #else
        __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 748, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_8(__pyx_t_3);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(1, 748, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_v_dim = __pyx_t_6;
    __pyx_t_6 = (__pyx_t_6 + 1);

    /* "View.MemoryView":749
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             slice_memviewslice(
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 */
    __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":753
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 *                 index, 0, 0, # start, stop, step             # <<<<<<<<<<<<<<
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 */
      __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 753, __pyx_L1_error)

      /* "View.MemoryView":750
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 */
      __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error)

      /* "View.MemoryView":749
 * 
 *     for dim, index in enumerate(indices):
 *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
 *             slice_memviewslice(
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":756
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 */
    __pyx_t_2 = (__pyx_v_index == Py_None);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":757
 *                 False)
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 */
      (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;

      /* "View.MemoryView":758
 *         elif index is None:
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1
 */
      (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;

      /* "View.MemoryView":759
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
 *             new_ndim += 1
 *         else:
 */
      (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;

      /* "View.MemoryView":760
 *             p_dst.strides[new_ndim] = 0
 *             p_dst.suboffsets[new_ndim] = -1
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 *         else:
 *             start = index.start or 0
 */
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);

      /* "View.MemoryView":756
 *                 0, 0, 0, # have_{start,stop,step}
 *                 False)
 *         elif index is None:             # <<<<<<<<<<<<<<
 *             p_dst.shape[new_ndim] = 1
 *             p_dst.strides[new_ndim] = 0
 */
      goto __pyx_L6;
    }

    /* "View.MemoryView":762
 *             new_ndim += 1
 *         else:
 *             start = index.start or 0             # <<<<<<<<<<<<<<
 *             stop = index.stop or 0
 *             step = index.step or 0
 */
    /*else*/ {
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 762, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 762, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_12;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_10 = 0;
      __pyx_L7_bool_binop_done:;
      __pyx_v_start = __pyx_t_10;

      /* "View.MemoryView":763
 *         else:
 *             start = index.start or 0
 *             stop = index.stop or 0             # <<<<<<<<<<<<<<
 *             step = index.step or 0
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 763, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_12;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_10 = 0;
      __pyx_L9_bool_binop_done:;
      __pyx_v_stop = __pyx_t_10;

      /* "View.MemoryView":764
 *             start = index.start or 0
 *             stop = index.stop or 0
 *             step = index.step or 0             # <<<<<<<<<<<<<<
 * 
 *             have_start = index.start is not None
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 764, __pyx_L1_error)
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else {
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
        __pyx_t_10 = __pyx_t_12;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L11_bool_binop_done;
      }
      __pyx_t_10 = 0;
      __pyx_L11_bool_binop_done:;
      __pyx_v_step = __pyx_t_10;

      /* "View.MemoryView":766
 *             step = index.step or 0
 * 
 *             have_start = index.start is not None             # <<<<<<<<<<<<<<
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__pyx_t_9 != Py_None);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_have_start = __pyx_t_1;

      /* "View.MemoryView":767
 * 
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
 *             have_step = index.step is not None
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__pyx_t_9 != Py_None);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_have_stop = __pyx_t_1;

      /* "View.MemoryView":768
 *             have_start = index.start is not None
 *             have_stop = index.stop is not None
 *             have_step = index.step is not None             # <<<<<<<<<<<<<<
 * 
 *             slice_memviewslice(
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = (__pyx_t_9 != Py_None);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_have_step = __pyx_t_1;

      /* "View.MemoryView":770
 *             have_step = index.step is not None
 * 
 *             slice_memviewslice(             # <<<<<<<<<<<<<<
 *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
 *                 dim, new_ndim, p_suboffset_dim,
 */
      __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error)

      /* "View.MemoryView":776
 *                 have_start, have_stop, have_step,
 *                 True)
 *             new_ndim += 1             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(memview, _memoryviewslice):
 */
      __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
    }
    __pyx_L6:;

    /* "View.MemoryView":748
 *     cdef bint have_start, have_stop, have_step
 * 
 *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
 *         if PyIndex_Check(index):
 *             slice_memviewslice(
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "View.MemoryView":778
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":779
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));

    /* "View.MemoryView":780
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_dtype_func,
 *                                     memview.dtype_is_object)
 */
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) }

    /* "View.MemoryView":781
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 *     else:
 */
    if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }

    /* "View.MemoryView":779
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
 *                                     memviewsliceobj.to_object_func,
 *                                     memviewsliceobj.to_dtype_func,
 */
    __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":778
 *             new_ndim += 1
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         return memoryview_fromslice(dst, new_ndim,
 *                                     memviewsliceobj.to_object_func,
 */
  }

  /* "View.MemoryView":784
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(((PyObject *)__pyx_r));

    /* "View.MemoryView":785
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
 *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "View.MemoryView":784
 *                                     memview.dtype_is_object)
 *     else:
 *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
 *                                     memview.dtype_is_object)
 * 
 */
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error)
    __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":712
 * 
 * @cname('__pyx_memview_slice')
 * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
 *     cdef int new_ndim = 0, suboffset_dim = -1, dim
 *     cdef bint negative_step
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":809
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')
 * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
 *         __Pyx_memviewslice *dst,
 *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
 */

static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
  Py_ssize_t __pyx_v_new_shape;
  int __pyx_v_negative_step;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":829
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
 */
  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":831
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
 */
    __pyx_t_1 = ((__pyx_v_start < 0) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":832
 * 
 *         if start < 0:
 *             start += shape             # <<<<<<<<<<<<<<
 *         if not 0 <= start < shape:
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
 */
      __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

      /* "View.MemoryView":831
 *     if not is_slice:
 * 
 *         if start < 0:             # <<<<<<<<<<<<<<
 *             start += shape
 *         if not 0 <= start < shape:
 */
    }

    /* "View.MemoryView":833
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
 */
    __pyx_t_1 = (0 <= __pyx_v_start);
    if (__pyx_t_1) {
      __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
    }
    __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":834
 *             start += shape
 *         if not 0 <= start < shape:
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
 *     else:
 * 
 */
      __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 834, __pyx_L1_error)

      /* "View.MemoryView":833
 *         if start < 0:
 *             start += shape
 *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
 *             _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
 *     else:
 */
    }

    /* "View.MemoryView":829
 *     cdef bint negative_step
 * 
 *     if not is_slice:             # <<<<<<<<<<<<<<
 * 
 *         if start < 0:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":837
 *     else:
 * 
 *         negative_step = have_step != 0 and step < 0             # <<<<<<<<<<<<<<
 * 
 *         if have_step and step == 0:
 */
  /*else*/ {
    __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_1 = ((__pyx_v_step < 0) != 0);
    __pyx_t_2 = __pyx_t_1;
    __pyx_L6_bool_binop_done:;
    __pyx_v_negative_step = __pyx_t_2;

    /* "View.MemoryView":839
 *         negative_step = have_step != 0 and step < 0
 * 
 *         if have_step and step == 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
 * 
 */
    __pyx_t_1 = (__pyx_v_have_step != 0);
    if (__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_1 = ((__pyx_v_step == 0) != 0);
    __pyx_t_2 = __pyx_t_1;
    __pyx_L9_bool_binop_done:;
    if (__pyx_t_2) {

      /* "View.MemoryView":840
 * 
 *         if have_step and step == 0:
 *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 840, __pyx_L1_error)

      /* "View.MemoryView":839
 *         negative_step = have_step != 0 and step < 0
 * 
 *         if have_step and step == 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
 * 
 */
    }

    /* "View.MemoryView":843
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
 */
    __pyx_t_2 = (__pyx_v_have_start != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":844
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
 */
      __pyx_t_2 = ((__pyx_v_start < 0) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":845
 *         if have_start:
 *             if start < 0:
 *                 start += shape             # <<<<<<<<<<<<<<
 *                 if start < 0:
 *                     start = 0
 */
        __pyx_v_start = (__pyx_v_start + __pyx_v_shape);

        /* "View.MemoryView":846
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
 */
        __pyx_t_2 = ((__pyx_v_start < 0) != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":847
 *                 start += shape
 *                 if start < 0:
 *                     start = 0             # <<<<<<<<<<<<<<
 *             elif start >= shape:
 *                 if negative_step:
 */
          __pyx_v_start = 0;

          /* "View.MemoryView":846
 *             if start < 0:
 *                 start += shape
 *                 if start < 0:             # <<<<<<<<<<<<<<
 *                     start = 0
 *             elif start >= shape:
 */
        }

        /* "View.MemoryView":844
 * 
 *         if have_start:
 *             if start < 0:             # <<<<<<<<<<<<<<
 *                 start += shape
 *                 if start < 0:
 */
        goto __pyx_L12;
      }

      /* "View.MemoryView":848
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
 */
      __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":849
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
 */
        __pyx_t_2 = (__pyx_v_negative_step != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":850
 *             elif start >= shape:
 *                 if negative_step:
 *                     start = shape - 1             # <<<<<<<<<<<<<<
 *                 else:
 *                     start = shape
 */
          __pyx_v_start = (__pyx_v_shape - 1);

          /* "View.MemoryView":849
 *                     start = 0
 *             elif start >= shape:
 *                 if negative_step:             # <<<<<<<<<<<<<<
 *                     start = shape - 1
 *                 else:
 */
          goto __pyx_L14;
        }

        /* "View.MemoryView":852
 *                     start = shape - 1
 *                 else:
 *                     start = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
 */
        /*else*/ {
          __pyx_v_start = __pyx_v_shape;
        }
        __pyx_L14:;

        /* "View.MemoryView":848
 *                 if start < 0:
 *                     start = 0
 *             elif start >= shape:             # <<<<<<<<<<<<<<
 *                 if negative_step:
 *                     start = shape - 1
 */
      }
      __pyx_L12:;

      /* "View.MemoryView":843
 * 
 * 
 *         if have_start:             # <<<<<<<<<<<<<<
 *             if start < 0:
 *                 start += shape
 */
      goto __pyx_L11;
    }

    /* "View.MemoryView":854
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
 */
    /*else*/ {
      __pyx_t_2 = (__pyx_v_negative_step != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":855
 *         else:
 *             if negative_step:
 *                 start = shape - 1             # <<<<<<<<<<<<<<
 *             else:
 *                 start = 0
 */
        __pyx_v_start = (__pyx_v_shape - 1);

        /* "View.MemoryView":854
 *                     start = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 start = shape - 1
 *             else:
 */
        goto __pyx_L15;
      }

      /* "View.MemoryView":857
 *                 start = shape - 1
 *             else:
 *                 start = 0             # <<<<<<<<<<<<<<
 * 
 *         if have_stop:
 */
      /*else*/ {
        __pyx_v_start = 0;
      }
      __pyx_L15:;
    }
    __pyx_L11:;

    /* "View.MemoryView":859
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
 */
    __pyx_t_2 = (__pyx_v_have_stop != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":860
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
 */
      __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":861
 *         if have_stop:
 *             if stop < 0:
 *                 stop += shape             # <<<<<<<<<<<<<<
 *                 if stop < 0:
 *                     stop = 0
 */
        __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);

        /* "View.MemoryView":862
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
 */
        __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
        if (__pyx_t_2) {

          /* "View.MemoryView":863
 *                 stop += shape
 *                 if stop < 0:
 *                     stop = 0             # <<<<<<<<<<<<<<
 *             elif stop > shape:
 *                 stop = shape
 */
          __pyx_v_stop = 0;

          /* "View.MemoryView":862
 *             if stop < 0:
 *                 stop += shape
 *                 if stop < 0:             # <<<<<<<<<<<<<<
 *                     stop = 0
 *             elif stop > shape:
 */
        }

        /* "View.MemoryView":860
 * 
 *         if have_stop:
 *             if stop < 0:             # <<<<<<<<<<<<<<
 *                 stop += shape
 *                 if stop < 0:
 */
        goto __pyx_L17;
      }

      /* "View.MemoryView":864
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
 */
      __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":865
 *                     stop = 0
 *             elif stop > shape:
 *                 stop = shape             # <<<<<<<<<<<<<<
 *         else:
 *             if negative_step:
 */
        __pyx_v_stop = __pyx_v_shape;

        /* "View.MemoryView":864
 *                 if stop < 0:
 *                     stop = 0
 *             elif stop > shape:             # <<<<<<<<<<<<<<
 *                 stop = shape
 *         else:
 */
      }
      __pyx_L17:;

      /* "View.MemoryView":859
 *                 start = 0
 * 
 *         if have_stop:             # <<<<<<<<<<<<<<
 *             if stop < 0:
 *                 stop += shape
 */
      goto __pyx_L16;
    }

    /* "View.MemoryView":867
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
 */
    /*else*/ {
      __pyx_t_2 = (__pyx_v_negative_step != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":868
 *         else:
 *             if negative_step:
 *                 stop = -1             # <<<<<<<<<<<<<<
 *             else:
 *                 stop = shape
 */
        __pyx_v_stop = -1L;

        /* "View.MemoryView":867
 *                 stop = shape
 *         else:
 *             if negative_step:             # <<<<<<<<<<<<<<
 *                 stop = -1
 *             else:
 */
        goto __pyx_L19;
      }

      /* "View.MemoryView":870
 *                 stop = -1
 *             else:
 *                 stop = shape             # <<<<<<<<<<<<<<
 * 
 *         if not have_step:
 */
      /*else*/ {
        __pyx_v_stop = __pyx_v_shape;
      }
      __pyx_L19:;
    }
    __pyx_L16:;

    /* "View.MemoryView":872
 *                 stop = shape
 * 
 *         if not have_step:             # <<<<<<<<<<<<<<
 *             step = 1
 * 
 */
    __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":873
 * 
 *         if not have_step:
 *             step = 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_step = 1;

      /* "View.MemoryView":872
 *                 stop = shape
 * 
 *         if not have_step:             # <<<<<<<<<<<<<<
 *             step = 1
 * 
 */
    }

    /* "View.MemoryView":877
 * 
 *         with cython.cdivision(True):
 *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
 * 
 *             if (stop - start) - step * new_shape:
 */
    __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);

    /* "View.MemoryView":879
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
 */
    __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":880
 * 
 *             if (stop - start) - step * new_shape:
 *                 new_shape += 1             # <<<<<<<<<<<<<<
 * 
 *         if new_shape < 0:
 */
      __pyx_v_new_shape = (__pyx_v_new_shape + 1);

      /* "View.MemoryView":879
 *             new_shape = (stop - start) // step
 * 
 *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
 *                 new_shape += 1
 * 
 */
    }

    /* "View.MemoryView":882
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
 */
    __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":883
 * 
 *         if new_shape < 0:
 *             new_shape = 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_new_shape = 0;

      /* "View.MemoryView":882
 *                 new_shape += 1
 * 
 *         if new_shape < 0:             # <<<<<<<<<<<<<<
 *             new_shape = 0
 * 
 */
    }

    /* "View.MemoryView":886
 * 
 * 
 *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset
 */
    (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);

    /* "View.MemoryView":887
 * 
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
 *         dst.suboffsets[new_ndim] = suboffset
 * 
 */
    (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;

    /* "View.MemoryView":888
 *         dst.strides[new_ndim] = stride * step
 *         dst.shape[new_ndim] = new_shape
 *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
 * 
 * 
 */
    (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
  }
  __pyx_L3:;

  /* "View.MemoryView":891
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
 */
  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":892
 * 
 *     if suboffset_dim[0] < 0:
 *         dst.data += start * stride             # <<<<<<<<<<<<<<
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 */
    __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));

    /* "View.MemoryView":891
 * 
 * 
 *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
 *         dst.data += start * stride
 *     else:
 */
    goto __pyx_L23;
  }

  /* "View.MemoryView":894
 *         dst.data += start * stride
 *     else:
 *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
 * 
 *     if suboffset >= 0:
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
    (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
  }
  __pyx_L23:;

  /* "View.MemoryView":896
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
 */
  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":897
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 */
    __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":898
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 */
      __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":899
 *         if not is_slice:
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
 */
        __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);

        /* "View.MemoryView":898
 *     if suboffset >= 0:
 *         if not is_slice:
 *             if new_ndim == 0:             # <<<<<<<<<<<<<<
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 */
        goto __pyx_L26;
      }

      /* "View.MemoryView":901
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 *             else:
 *                 _err_dim(IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
 *                                      "must be indexed and not sliced", dim)
 *         else:
 */
      /*else*/ {

        /* "View.MemoryView":902
 *             else:
 *                 _err_dim(IndexError, "All dimensions preceding dimension %d "
 *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
 *         else:
 *             suboffset_dim[0] = new_ndim
 */
        __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 901, __pyx_L1_error)
      }
      __pyx_L26:;

      /* "View.MemoryView":897
 * 
 *     if suboffset >= 0:
 *         if not is_slice:             # <<<<<<<<<<<<<<
 *             if new_ndim == 0:
 *                 dst.data = (<char **> dst.data)[0] + suboffset
 */
      goto __pyx_L25;
    }

    /* "View.MemoryView":904
 *                                      "must be indexed and not sliced", dim)
 *         else:
 *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
 * 
 *     return 0
 */
    /*else*/ {
      (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
    }
    __pyx_L25:;

    /* "View.MemoryView":896
 *         dst.suboffsets[suboffset_dim[0]] += start * stride
 * 
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         if not is_slice:
 *             if new_ndim == 0:
 */
  }

  /* "View.MemoryView":906
 *             suboffset_dim[0] = new_ndim
 * 
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":809
 * 
 * @cname('__pyx_memoryview_slice_memviewslice')
 * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
 *         __Pyx_memviewslice *dst,
 *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":912
 * 
 * @cname('__pyx_pybuffer_index')
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 */

static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_suboffset;
  Py_ssize_t __pyx_v_itemsize;
  char *__pyx_v_resultp;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pybuffer_index", 0);

  /* "View.MemoryView":914
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t itemsize = view.itemsize
 *     cdef char *resultp
 */
  __pyx_v_suboffset = -1L;

  /* "View.MemoryView":915
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
 *     cdef char *resultp
 * 
 */
  __pyx_t_1 = __pyx_v_view->itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":918
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len / itemsize
 *         stride = itemsize
 */
  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":919
 * 
 *     if view.ndim == 0:
 *         shape = view.len / itemsize             # <<<<<<<<<<<<<<
 *         stride = itemsize
 *     else:
 */
    if (unlikely(__pyx_v_itemsize == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
      __PYX_ERR(1, 919, __pyx_L1_error)
    }
    else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
      PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
      __PYX_ERR(1, 919, __pyx_L1_error)
    }
    __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);

    /* "View.MemoryView":920
 *     if view.ndim == 0:
 *         shape = view.len / itemsize
 *         stride = itemsize             # <<<<<<<<<<<<<<
 *     else:
 *         shape = view.shape[dim]
 */
    __pyx_v_stride = __pyx_v_itemsize;

    /* "View.MemoryView":918
 *     cdef char *resultp
 * 
 *     if view.ndim == 0:             # <<<<<<<<<<<<<<
 *         shape = view.len / itemsize
 *         stride = itemsize
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":922
 *         stride = itemsize
 *     else:
 *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 */
  /*else*/ {
    __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);

    /* "View.MemoryView":923
 *     else:
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]
 */
    __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);

    /* "View.MemoryView":924
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
 */
    __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":925
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:
 *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
 * 
 *     if index < 0:
 */
      __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);

      /* "View.MemoryView":924
 *         shape = view.shape[dim]
 *         stride = view.strides[dim]
 *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
 *             suboffset = view.suboffsets[dim]
 * 
 */
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":927
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
 */
  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":928
 * 
 *     if index < 0:
 *         index += view.shape[dim]             # <<<<<<<<<<<<<<
 *         if index < 0:
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 */
    __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));

    /* "View.MemoryView":929
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
    __pyx_t_2 = ((__pyx_v_index < 0) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "View.MemoryView":930
 *         index += view.shape[dim]
 *         if index < 0:
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
 * 
 *     if index >= shape:
 */
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 930, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(1, 930, __pyx_L1_error)

      /* "View.MemoryView":929
 *     if index < 0:
 *         index += view.shape[dim]
 *         if index < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
    }

    /* "View.MemoryView":927
 *             suboffset = view.suboffsets[dim]
 * 
 *     if index < 0:             # <<<<<<<<<<<<<<
 *         index += view.shape[dim]
 *         if index < 0:
 */
  }

  /* "View.MemoryView":932
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "View.MemoryView":933
 * 
 *     if index >= shape:
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)             # <<<<<<<<<<<<<<
 * 
 *     resultp = bufp + index * stride
 */
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 933, __pyx_L1_error)

    /* "View.MemoryView":932
 *             raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 *     if index >= shape:             # <<<<<<<<<<<<<<
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 */
  }

  /* "View.MemoryView":935
 *         raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
 * 
 *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset
 */
  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));

  /* "View.MemoryView":936
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 */
  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":937
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:
 *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
 * 
 *     return resultp
 */
    __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);

    /* "View.MemoryView":936
 * 
 *     resultp = bufp + index * stride
 *     if suboffset >= 0:             # <<<<<<<<<<<<<<
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 */
  }

  /* "View.MemoryView":939
 *         resultp = (<char **> resultp)[0] + suboffset
 * 
 *     return resultp             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_resultp;
  goto __pyx_L0;

  /* "View.MemoryView":912
 * 
 * @cname('__pyx_pybuffer_index')
 * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
 *                           Py_ssize_t dim) except NULL:
 *     cdef Py_ssize_t shape, stride, suboffset = -1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":945
 * 
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 */

static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
  int __pyx_v_ndim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_r;
  int __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  long __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":946
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
 *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 */
  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
  __pyx_v_ndim = __pyx_t_1;

  /* "View.MemoryView":948
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t *strides = memslice.strides
 * 
 */
  __pyx_t_2 = __pyx_v_memslice->shape;
  __pyx_v_shape = __pyx_t_2;

  /* "View.MemoryView":949
 * 
 *     cdef Py_ssize_t *shape = memslice.shape
 *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __pyx_v_memslice->strides;
  __pyx_v_strides = __pyx_t_2;

  /* "View.MemoryView":953
 * 
 *     cdef int i, j
 *     for i in range(ndim / 2):             # <<<<<<<<<<<<<<
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 */
  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":954
 *     cdef int i, j
 *     for i in range(ndim / 2):
 *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]
 */
    __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);

    /* "View.MemoryView":955
 *     for i in range(ndim / 2):
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 */
    __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
    __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
    (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
    (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;

    /* "View.MemoryView":956
 *         j = ndim - 1 - i
 *         strides[i], strides[j] = strides[j], strides[i]
 *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 */
    __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
    __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
    (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
    (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;

    /* "View.MemoryView":958
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 */
    __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
    if (!__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_7) {

      /* "View.MemoryView":959
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
 * 
 *     return 1
 */
      __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 959, __pyx_L1_error)

      /* "View.MemoryView":958
 *         shape[i], shape[j] = shape[j], shape[i]
 * 
 *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 */
    }
  }

  /* "View.MemoryView":961
 *             _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
 * 
 *     return 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "View.MemoryView":945
 * 
 * @cname('__pyx_memslice_transpose')
 * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:             # <<<<<<<<<<<<<<
 *     cdef int ndim = memslice.memview.view.ndim
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":978
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 */

/* Python wrapper */
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

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

static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "View.MemoryView":979
 * 
 *     def __dealloc__(self):
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 */
  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);

  /* "View.MemoryView":978
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 */

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

/* "View.MemoryView":981
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
 */

static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_item_to_object", 0);

  /* "View.MemoryView":982
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":983
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "View.MemoryView":982
 * 
 *     cdef convert_item_to_object(self, char *itemp):
 *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
 *             return self.to_object_func(itemp)
 *         else:
 */
  }

  /* "View.MemoryView":985
 *             return self.to_object_func(itemp)
 *         else:
 *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "View.MemoryView":981
 *         __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
 * 
 *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
 *         if self.to_object_func != NULL:
 *             return self.to_object_func(itemp)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":987
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
 */

static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("assign_item_from_object", 0);

  /* "View.MemoryView":988
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":989
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)
 */
    __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 989, __pyx_L1_error)

    /* "View.MemoryView":988
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):
 *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
 *             self.to_dtype_func(itemp, value)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":991
 *             self.to_dtype_func(itemp, value)
 *         else:
 *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  /*else*/ {
    __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 991, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "View.MemoryView":987
 *             return memoryview.convert_item_to_object(self, itemp)
 * 
 *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
 *         if self.to_dtype_func != NULL:
 *             self.to_dtype_func(itemp, value)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":994
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "View.MemoryView":995
 *     @property
 *     def base(self):
 *         return self.from_object             # <<<<<<<<<<<<<<
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->from_object);
  __pyx_r = __pyx_v_self->from_object;
  goto __pyx_L0;

  /* "View.MemoryView":994
 * 
 *     @property
 *     def base(self):             # <<<<<<<<<<<<<<
 *         return self.from_object
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef___pyx_memoryviewslice_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw___pyx_memoryviewslice_1__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___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));

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

static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef___pyx_memoryviewslice_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw___pyx_memoryviewslice_3__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___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1001
 * 
 * @cname('__pyx_memoryview_fromslice')
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
 *                           int ndim,
 *                           object (*to_object_func)(char *),
 */

static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_suboffset;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_TypeInfo *__pyx_t_4;
  Py_buffer __pyx_t_5;
  Py_ssize_t *__pyx_t_6;
  Py_ssize_t *__pyx_t_7;
  Py_ssize_t *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);

  /* "View.MemoryView":1009
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1010
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:
 *         return None             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "View.MemoryView":1009
 *     cdef _memoryviewslice result
 * 
 *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  }

  /* "View.MemoryView":1015
 * 
 * 
 *     result = _memoryviewslice(None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 *     result.from_slice = memviewslice
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":1017
 *     result = _memoryviewslice(None, 0, dtype_is_object)
 * 
 *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 */
  __pyx_v_result->from_slice = __pyx_v_memviewslice;

  /* "View.MemoryView":1018
 * 
 *     result.from_slice = memviewslice
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
 * 
 *     result.from_object = (<memoryview> memviewslice.memview).base
 */
  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);

  /* "View.MemoryView":1020
 *     __PYX_INC_MEMVIEW(&memviewslice, 1)
 * 
 *     result.from_object = (<memoryview> memviewslice.memview).base             # <<<<<<<<<<<<<<
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_result->from_object);
  __Pyx_DECREF(__pyx_v_result->from_object);
  __pyx_v_result->from_object = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "View.MemoryView":1021
 * 
 *     result.from_object = (<memoryview> memviewslice.memview).base
 *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
 * 
 *     result.view = memviewslice.memview.view
 */
  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;

  /* "View.MemoryView":1023
 *     result.typeinfo = memviewslice.memview.typeinfo
 * 
 *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 */
  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
  __pyx_v_result->__pyx_base.view = __pyx_t_5;

  /* "View.MemoryView":1024
 * 
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 */
  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);

  /* "View.MemoryView":1025
 *     result.view = memviewslice.memview.view
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)
 */
  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;

  /* "View.MemoryView":1026
 *     result.view.buf = <void *> memviewslice.data
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
 *     Py_INCREF(Py_None)
 * 
 */
  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;

  /* "View.MemoryView":1027
 *     result.view.ndim = ndim
 *     (<__pyx_buffer *> &result.view).obj = Py_None
 *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 */
  Py_INCREF(Py_None);

  /* "View.MemoryView":1029
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
 */
  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1030
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
 *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
 *     else:
 *         result.flags = PyBUF_RECORDS_RO
 */
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;

    /* "View.MemoryView":1029
 *     Py_INCREF(Py_None)
 * 
 *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
 *         result.flags = PyBUF_RECORDS
 *     else:
 */
    goto __pyx_L4;
  }

  /* "View.MemoryView":1032
 *         result.flags = PyBUF_RECORDS
 *     else:
 *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 */
  /*else*/ {
    __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
  }
  __pyx_L4:;

  /* "View.MemoryView":1034
 *         result.flags = PyBUF_RECORDS_RO
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
 * 
 */
  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);

  /* "View.MemoryView":1035
 * 
 *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
 *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);

  /* "View.MemoryView":1038
 * 
 * 
 *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 */
  __pyx_v_result->__pyx_base.view.suboffsets = NULL;

  /* "View.MemoryView":1039
 * 
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 */
  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_v_suboffset = (__pyx_t_6[0]);

    /* "View.MemoryView":1040
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
 */
    __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
    if (__pyx_t_1) {

      /* "View.MemoryView":1041
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);

      /* "View.MemoryView":1042
 *         if suboffset >= 0:
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break             # <<<<<<<<<<<<<<
 * 
 *     result.view.len = result.view.itemsize
 */
      goto __pyx_L6_break;

      /* "View.MemoryView":1040
 *     result.view.suboffsets = NULL
 *     for suboffset in result.from_slice.suboffsets[:ndim]:
 *         if suboffset >= 0:             # <<<<<<<<<<<<<<
 *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
 *             break
 */
    }
  }
  __pyx_L6_break:;

  /* "View.MemoryView":1044
 *             break
 * 
 *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length
 */
  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;

  /* "View.MemoryView":1045
 * 
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         result.view.len *= length
 * 
 */
  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
    __pyx_t_6 = __pyx_t_8;
    __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "View.MemoryView":1046
 *     result.view.len = result.view.itemsize
 *     for length in result.view.shape[:ndim]:
 *         result.view.len *= length             # <<<<<<<<<<<<<<
 * 
 *     result.to_object_func = to_object_func
 */
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1046, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
  }

  /* "View.MemoryView":1048
 *         result.view.len *= length
 * 
 *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
 *     result.to_dtype_func = to_dtype_func
 * 
 */
  __pyx_v_result->to_object_func = __pyx_v_to_object_func;

  /* "View.MemoryView":1049
 * 
 *     result.to_object_func = to_object_func
 *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;

  /* "View.MemoryView":1051
 *     result.to_dtype_func = to_dtype_func
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "View.MemoryView":1001
 * 
 * @cname('__pyx_memoryview_fromslice')
 * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
 *                           int ndim,
 *                           object (*to_object_func)(char *),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1054
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 */

static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
  __Pyx_memviewslice *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);

  /* "View.MemoryView":1057
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1058
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview             # <<<<<<<<<<<<<<
 *         return &obj.from_slice
 *     else:
 */
    if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1058, __pyx_L1_error)
    __pyx_t_3 = ((PyObject *)__pyx_v_memview);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "View.MemoryView":1059
 *     if isinstance(memview, _memoryviewslice):
 *         obj = memview
 *         return &obj.from_slice             # <<<<<<<<<<<<<<
 *     else:
 *         slice_copy(memview, mslice)
 */
    __pyx_r = (&__pyx_v_obj->from_slice);
    goto __pyx_L0;

    /* "View.MemoryView":1057
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         obj = memview
 *         return &obj.from_slice
 */
  }

  /* "View.MemoryView":1061
 *         return &obj.from_slice
 *     else:
 *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
 *         return mslice
 * 
 */
  /*else*/ {
    __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);

    /* "View.MemoryView":1062
 *     else:
 *         slice_copy(memview, mslice)
 *         return mslice             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_slice_copy')
 */
    __pyx_r = __pyx_v_mslice;
    goto __pyx_L0;
  }

  /* "View.MemoryView":1054
 * 
 * @cname('__pyx_memoryview_get_slice_from_memoryview')
 * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
 *                                                    __Pyx_memviewslice *mslice) except NULL:
 *     cdef _memoryviewslice obj
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1065
 * 
 * @cname('__pyx_memoryview_slice_copy')
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
 *     cdef int dim
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 */

static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
  int __pyx_v_dim;
  Py_ssize_t *__pyx_v_shape;
  Py_ssize_t *__pyx_v_strides;
  Py_ssize_t *__pyx_v_suboffsets;
  __Pyx_RefNannyDeclarations
  Py_ssize_t *__pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  __Pyx_RefNannySetupContext("slice_copy", 0);

  /* "View.MemoryView":1069
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 * 
 *     shape = memview.view.shape             # <<<<<<<<<<<<<<
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets
 */
  __pyx_t_1 = __pyx_v_memview->view.shape;
  __pyx_v_shape = __pyx_t_1;

  /* "View.MemoryView":1070
 * 
 *     shape = memview.view.shape
 *     strides = memview.view.strides             # <<<<<<<<<<<<<<
 *     suboffsets = memview.view.suboffsets
 * 
 */
  __pyx_t_1 = __pyx_v_memview->view.strides;
  __pyx_v_strides = __pyx_t_1;

  /* "View.MemoryView":1071
 *     shape = memview.view.shape
 *     strides = memview.view.strides
 *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 */
  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
  __pyx_v_suboffsets = __pyx_t_1;

  /* "View.MemoryView":1073
 *     suboffsets = memview.view.suboffsets
 * 
 *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
 *     dst.data = <char *> memview.view.buf
 * 
 */
  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);

  /* "View.MemoryView":1074
 * 
 *     dst.memview = <__pyx_memoryview *> memview
 *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
 * 
 *     for dim in range(memview.view.ndim):
 */
  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);

  /* "View.MemoryView":1076
 *     dst.data = <char *> memview.view.buf
 * 
 *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 */
  __pyx_t_2 = __pyx_v_memview->view.ndim;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_dim = __pyx_t_4;

    /* "View.MemoryView":1077
 * 
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 */
    (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);

    /* "View.MemoryView":1078
 *     for dim in range(memview.view.ndim):
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
 * 
 */
    (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);

    /* "View.MemoryView":1079
 *         dst.shape[dim] = shape[dim]
 *         dst.strides[dim] = strides[dim]
 *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object')
 */
    if ((__pyx_v_suboffsets != 0)) {
      __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
    } else {
      __pyx_t_5 = -1L;
    }
    (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
  }

  /* "View.MemoryView":1065
 * 
 * @cname('__pyx_memoryview_slice_copy')
 * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst):             # <<<<<<<<<<<<<<
 *     cdef int dim
 *     cdef (Py_ssize_t*) shape, strides, suboffsets
 */

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

/* "View.MemoryView":1082
 * 
 * @cname('__pyx_memoryview_copy_object')
 * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 */

static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
  __Pyx_memviewslice __pyx_v_memviewslice;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_copy", 0);

  /* "View.MemoryView":1085
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
 *     return memoryview_copy_from_slice(memview, &memviewslice)
 * 
 */
  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));

  /* "View.MemoryView":1086
 *     cdef __Pyx_memviewslice memviewslice
 *     slice_copy(memview, &memviewslice)
 *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1082
 * 
 * @cname('__pyx_memoryview_copy_object')
 * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
 *     "Create a new memoryview object"
 *     cdef __Pyx_memviewslice memviewslice
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1089
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
 *     """
 *     Create a new memoryview object from a given memoryview object and slice.
 */

static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
  PyObject *(*__pyx_v_to_object_func)(char *);
  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *(*__pyx_t_3)(char *);
  int (*__pyx_t_4)(char *, PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);

  /* "View.MemoryView":1096
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 */
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1097
 * 
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 */
    __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
    __pyx_v_to_object_func = __pyx_t_3;

    /* "View.MemoryView":1098
 *     if isinstance(memview, _memoryviewslice):
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
 *     else:
 *         to_object_func = NULL
 */
    __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
    __pyx_v_to_dtype_func = __pyx_t_4;

    /* "View.MemoryView":1096
 *     cdef int (*to_dtype_func)(char *, object) except 0
 * 
 *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
 *         to_object_func = (<_memoryviewslice> memview).to_object_func
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1100
 *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
 *     else:
 *         to_object_func = NULL             # <<<<<<<<<<<<<<
 *         to_dtype_func = NULL
 * 
 */
  /*else*/ {
    __pyx_v_to_object_func = NULL;

    /* "View.MemoryView":1101
 *     else:
 *         to_object_func = NULL
 *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 */
    __pyx_v_to_dtype_func = NULL;
  }
  __pyx_L3:;

  /* "View.MemoryView":1103
 *         to_dtype_func = NULL
 * 
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "View.MemoryView":1105
 *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
 *                                 to_object_func, to_dtype_func,
 *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1089
 * 
 * @cname('__pyx_memoryview_copy_object_from_slice')
 * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
 *     """
 *     Create a new memoryview object from a given memoryview object and slice.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "View.MemoryView":1111
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
 *     if arg < 0:
 *         return -arg
 */

static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
  Py_ssize_t __pyx_r;
  int __pyx_t_1;

  /* "View.MemoryView":1112
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
 *     if arg < 0:             # <<<<<<<<<<<<<<
 *         return -arg
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1113
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
 *     if arg < 0:
 *         return -arg             # <<<<<<<<<<<<<<
 *     else:
 *         return arg
 */
    __pyx_r = (-__pyx_v_arg);
    goto __pyx_L0;

    /* "View.MemoryView":1112
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
 *     if arg < 0:             # <<<<<<<<<<<<<<
 *         return -arg
 *     else:
 */
  }

  /* "View.MemoryView":1115
 *         return -arg
 *     else:
 *         return arg             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_get_best_slice_order')
 */
  /*else*/ {
    __pyx_r = __pyx_v_arg;
    goto __pyx_L0;
  }

  /* "View.MemoryView":1111
 * 
 * 
 * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:             # <<<<<<<<<<<<<<
 *     if arg < 0:
 *         return -arg
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1118
 * 
 * @cname('__pyx_get_best_slice_order')
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Figure out the best memory access order for a given slice.
 */

static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
  int __pyx_v_i;
  Py_ssize_t __pyx_v_c_stride;
  Py_ssize_t __pyx_v_f_stride;
  char __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1123
 *     """
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t f_stride = 0
 * 
 */
  __pyx_v_c_stride = 0;

  /* "View.MemoryView":1124
 *     cdef int i
 *     cdef Py_ssize_t c_stride = 0
 *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
 */
  __pyx_v_f_stride = 0;

  /* "View.MemoryView":1126
 *     cdef Py_ssize_t f_stride = 0
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 */
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1127
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
 */
    __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1128
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1129
 *         if mslice.shape[i] > 1:
 *             c_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
 */
      goto __pyx_L4_break;

      /* "View.MemoryView":1127
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             c_stride = mslice.strides[i]
 *             break
 */
    }
  }
  __pyx_L4_break:;

  /* "View.MemoryView":1131
 *             break
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 */
  __pyx_t_1 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1132
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
 */
    __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1133
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
 *             break
 * 
 */
      __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);

      /* "View.MemoryView":1134
 *         if mslice.shape[i] > 1:
 *             f_stride = mslice.strides[i]
 *             break             # <<<<<<<<<<<<<<
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 */
      goto __pyx_L7_break;

      /* "View.MemoryView":1132
 * 
 *     for i in range(ndim):
 *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
 *             f_stride = mslice.strides[i]
 *             break
 */
    }
  }
  __pyx_L7_break:;

  /* "View.MemoryView":1136
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
 */
  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1137
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
 *         return 'C'             # <<<<<<<<<<<<<<
 *     else:
 *         return 'F'
 */
    __pyx_r = 'C';
    goto __pyx_L0;

    /* "View.MemoryView":1136
 *             break
 * 
 *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
 *         return 'C'
 *     else:
 */
  }

  /* "View.MemoryView":1139
 *         return 'C'
 *     else:
 *         return 'F'             # <<<<<<<<<<<<<<
 * 
 * @cython.cdivision(True)
 */
  /*else*/ {
    __pyx_r = 'F';
    goto __pyx_L0;
  }

  /* "View.MemoryView":1118
 * 
 * @cname('__pyx_get_best_slice_order')
 * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     """
 *     Figure out the best memory access order for a given slice.
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1142
 * 
 * @cython.cdivision(True)
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
 *                                    char *dst_data, Py_ssize_t *dst_strides,
 *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
 */

static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
  Py_ssize_t __pyx_v_dst_extent;
  Py_ssize_t __pyx_v_src_stride;
  Py_ssize_t __pyx_v_dst_stride;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;

  /* "View.MemoryView":1149
 * 
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 */
  __pyx_v_src_extent = (__pyx_v_src_shape[0]);

  /* "View.MemoryView":1150
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 */
  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);

  /* "View.MemoryView":1151
 *     cdef Py_ssize_t src_extent = src_shape[0]
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 */
  __pyx_v_src_stride = (__pyx_v_src_strides[0]);

  /* "View.MemoryView":1152
 *     cdef Py_ssize_t dst_extent = dst_shape[0]
 *     cdef Py_ssize_t src_stride = src_strides[0]
 *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
 */
  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);

  /* "View.MemoryView":1154
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 */
  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1155
 * 
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 */
    __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "View.MemoryView":1156
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 *        else:
 */
    __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
    if (__pyx_t_2) {
      __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
    }
    __pyx_t_3 = (__pyx_t_2 != 0);
    __pyx_t_1 = __pyx_t_3;
    __pyx_L5_bool_binop_done:;

    /* "View.MemoryView":1155
 * 
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 */
    if (__pyx_t_1) {

      /* "View.MemoryView":1157
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
 *        else:
 *            for i in range(dst_extent):
 */
      (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));

      /* "View.MemoryView":1155
 * 
 *     if ndim == 1:
 *        if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 */
      goto __pyx_L4;
    }

    /* "View.MemoryView":1159
 *            memcpy(dst_data, src_data, itemsize * dst_extent)
 *        else:
 *            for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *                memcpy(dst_data, src_data, itemsize)
 *                src_data += src_stride
 */
    /*else*/ {
      __pyx_t_4 = __pyx_v_dst_extent;
      __pyx_t_5 = __pyx_t_4;
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
        __pyx_v_i = __pyx_t_6;

        /* "View.MemoryView":1160
 *        else:
 *            for i in range(dst_extent):
 *                memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
 *                src_data += src_stride
 *                dst_data += dst_stride
 */
        (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));

        /* "View.MemoryView":1161
 *            for i in range(dst_extent):
 *                memcpy(dst_data, src_data, itemsize)
 *                src_data += src_stride             # <<<<<<<<<<<<<<
 *                dst_data += dst_stride
 *     else:
 */
        __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

        /* "View.MemoryView":1162
 *                memcpy(dst_data, src_data, itemsize)
 *                src_data += src_stride
 *                dst_data += dst_stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(dst_extent):
 */
        __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
      }
    }
    __pyx_L4:;

    /* "View.MemoryView":1154
 *     cdef Py_ssize_t dst_stride = dst_strides[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *        if (src_stride > 0 and dst_stride > 0 and
 *            <size_t> src_stride == itemsize == <size_t> dst_stride):
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1164
 *                dst_data += dst_stride
 *     else:
 *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
 *             _copy_strided_to_strided(src_data, src_strides + 1,
 *                                      dst_data, dst_strides + 1,
 */
  /*else*/ {
    __pyx_t_4 = __pyx_v_dst_extent;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "View.MemoryView":1165
 *     else:
 *         for i in range(dst_extent):
 *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
 *                                      dst_data, dst_strides + 1,
 *                                      src_shape + 1, dst_shape + 1,
 */
      _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);

      /* "View.MemoryView":1169
 *                                      src_shape + 1, dst_shape + 1,
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride             # <<<<<<<<<<<<<<
 *             dst_data += dst_stride
 * 
 */
      __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);

      /* "View.MemoryView":1170
 *                                      ndim - 1, itemsize)
 *             src_data += src_stride
 *             dst_data += dst_stride             # <<<<<<<<<<<<<<
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
 */
      __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1142
 * 
 * @cython.cdivision(True)
 * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
 *                                    char *dst_data, Py_ssize_t *dst_strides,
 *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
 */

  /* function exit code */
}

/* "View.MemoryView":1172
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) nogil:
 */

static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {

  /* "View.MemoryView":1175
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) nogil:
 *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
 *                              src.shape, dst.shape, ndim, itemsize)
 * 
 */
  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1172
 *             dst_data += dst_stride
 * 
 * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice *dst,
 *                                   int ndim, size_t itemsize) nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1179
 * 
 * @cname('__pyx_memoryview_slice_get_size')
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 */

static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
  Py_ssize_t __pyx_v_shape;
  Py_ssize_t __pyx_v_size;
  Py_ssize_t __pyx_r;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  Py_ssize_t *__pyx_t_3;
  Py_ssize_t *__pyx_t_4;

  /* "View.MemoryView":1181
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 * 
 *     for shape in src.shape[:ndim]:
 */
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_size = __pyx_t_1;

  /* "View.MemoryView":1183
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 * 
 *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
 *         size *= shape
 * 
 */
  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
    __pyx_t_2 = __pyx_t_4;
    __pyx_v_shape = (__pyx_t_2[0]);

    /* "View.MemoryView":1184
 * 
 *     for shape in src.shape[:ndim]:
 *         size *= shape             # <<<<<<<<<<<<<<
 * 
 *     return size
 */
    __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
  }

  /* "View.MemoryView":1186
 *         size *= shape
 * 
 *     return size             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_fill_contig_strides_array')
 */
  __pyx_r = __pyx_v_size;
  goto __pyx_L0;

  /* "View.MemoryView":1179
 * 
 * @cname('__pyx_memoryview_slice_get_size')
 * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:             # <<<<<<<<<<<<<<
 *     "Return the size of the memory occupied by the slice in number of bytes"
 *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1189
 * 
 * @cname('__pyx_fill_contig_strides_array')
 * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
 *                 int ndim, char order) nogil:
 */

static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
  int __pyx_v_idx;
  Py_ssize_t __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "View.MemoryView":1198
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
 */
  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1199
 * 
 *     if order == 'F':
 *         for idx in range(ndim):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
 */
    __pyx_t_2 = __pyx_v_ndim;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_idx = __pyx_t_4;

      /* "View.MemoryView":1200
 *     if order == 'F':
 *         for idx in range(ndim):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 *     else:
 */
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1201
 *         for idx in range(ndim):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 */
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }

    /* "View.MemoryView":1198
 *     cdef int idx
 * 
 *     if order == 'F':             # <<<<<<<<<<<<<<
 *         for idx in range(ndim):
 *             strides[idx] = stride
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1203
 *             stride *= shape[idx]
 *     else:
 *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *             strides[idx] = stride
 *             stride *= shape[idx]
 */
  /*else*/ {
    for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
      __pyx_v_idx = __pyx_t_2;

      /* "View.MemoryView":1204
 *     else:
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride             # <<<<<<<<<<<<<<
 *             stride *= shape[idx]
 * 
 */
      (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;

      /* "View.MemoryView":1205
 *         for idx in range(ndim - 1, -1, -1):
 *             strides[idx] = stride
 *             stride *= shape[idx]             # <<<<<<<<<<<<<<
 * 
 *     return stride
 */
      __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1207
 *             stride *= shape[idx]
 * 
 *     return stride             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 */
  __pyx_r = __pyx_v_stride;
  goto __pyx_L0;

  /* "View.MemoryView":1189
 * 
 * @cname('__pyx_fill_contig_strides_array')
 * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
 *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
 *                 int ndim, char order) nogil:
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1210
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                              __Pyx_memviewslice *tmpslice,
 *                              char order,
 */

static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
  int __pyx_v_i;
  void *__pyx_v_result;
  size_t __pyx_v_itemsize;
  size_t __pyx_v_size;
  void *__pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  struct __pyx_memoryview_obj *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":1221
 *     cdef void *result
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 */
  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1222
 * 
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
 * 
 *     result = malloc(size)
 */
  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);

  /* "View.MemoryView":1224
 *     cdef size_t size = slice_get_size(src, ndim)
 * 
 *     result = malloc(size)             # <<<<<<<<<<<<<<
 *     if not result:
 *         _err(MemoryError, NULL)
 */
  __pyx_v_result = malloc(__pyx_v_size);

  /* "View.MemoryView":1225
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err(MemoryError, NULL)
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1226
 *     result = malloc(size)
 *     if not result:
 *         _err(MemoryError, NULL)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1226, __pyx_L1_error)

    /* "View.MemoryView":1225
 * 
 *     result = malloc(size)
 *     if not result:             # <<<<<<<<<<<<<<
 *         _err(MemoryError, NULL)
 * 
 */
  }

  /* "View.MemoryView":1229
 * 
 * 
 *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 */
  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);

  /* "View.MemoryView":1230
 * 
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 */
  __pyx_t_4 = __pyx_v_src->memview;
  __pyx_v_tmpslice->memview = __pyx_t_4;

  /* "View.MemoryView":1231
 *     tmpslice.data = <char *> result
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1
 */
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1232
 *     tmpslice.memview = src.memview
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
 *         tmpslice.suboffsets[i] = -1
 * 
 */
    (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);

    /* "View.MemoryView":1233
 *     for i in range(ndim):
 *         tmpslice.shape[i] = src.shape[i]
 *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
 */
    (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1235
 *         tmpslice.suboffsets[i] = -1
 * 
 *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,             # <<<<<<<<<<<<<<
 *                               ndim, order)
 * 
 */
  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));

  /* "View.MemoryView":1239
 * 
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0
 */
  __pyx_t_3 = __pyx_v_ndim;
  __pyx_t_5 = __pyx_t_3;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "View.MemoryView":1240
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
 */
    __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1241
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:
 *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     if slice_is_contig(src[0], order, ndim):
 */
      (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;

      /* "View.MemoryView":1240
 * 
 *     for i in range(ndim):
 *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
 *             tmpslice.strides[i] = 0
 * 
 */
    }
  }

  /* "View.MemoryView":1243
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
 */
  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1244
 * 
 *     if slice_is_contig(src[0], order, ndim):
 *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 */
    (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));

    /* "View.MemoryView":1243
 *             tmpslice.strides[i] = 0
 * 
 *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
 *         memcpy(result, src.data, size)
 *     else:
 */
    goto __pyx_L9;
  }

  /* "View.MemoryView":1246
 *         memcpy(result, src.data, size)
 *     else:
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  /*else*/ {
    copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
  }
  __pyx_L9:;

  /* "View.MemoryView":1248
 *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "View.MemoryView":1210
 * 
 * @cname('__pyx_memoryview_copy_data_to_temp')
 * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
 *                              __Pyx_memviewslice *tmpslice,
 *                              char order,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = NULL;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1253
 * 
 * @cname('__pyx_memoryview_err_extents')
 * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
 */

static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err_extents", 0);

  /* "View.MemoryView":1256
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
 *                                                         (i, extent1, extent2))             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err_dim')
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1256, __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_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;

  /* "View.MemoryView":1255
 * cdef int _err_extents(int i, Py_ssize_t extent1,
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %             # <<<<<<<<<<<<<<
 *                                                         (i, extent1, extent2))
 * 
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __PYX_ERR(1, 1255, __pyx_L1_error)

  /* "View.MemoryView":1253
 * 
 * @cname('__pyx_memoryview_err_extents')
 * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
 *                              Py_ssize_t extent2) except -1 with gil:
 *     raise ValueError("got differing extents in dimension %d (got %d and %d)" %
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1259
 * 
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise error(msg.decode('ascii') % dim)
 * 
 */

static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err_dim", 0);
  __Pyx_INCREF(__pyx_v_error);

  /* "View.MemoryView":1260
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
 *     raise error(msg.decode('ascii') % dim)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_err')
 */
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_v_error);
  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 1260, __pyx_L1_error)

  /* "View.MemoryView":1259
 * 
 * @cname('__pyx_memoryview_err_dim')
 * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
 *     raise error(msg.decode('ascii') % dim)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_error);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1263
 * 
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
 *     if msg != NULL:
 *         raise error(msg.decode('ascii'))
 */

static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("_err", 0);
  __Pyx_INCREF(__pyx_v_error);

  /* "View.MemoryView":1264
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:
 *     if msg != NULL:             # <<<<<<<<<<<<<<
 *         raise error(msg.decode('ascii'))
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "View.MemoryView":1265
 * cdef int _err(object error, char *msg) except -1 with gil:
 *     if msg != NULL:
 *         raise error(msg.decode('ascii'))             # <<<<<<<<<<<<<<
 *     else:
 *         raise error
 */
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_error);
    __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1265, __pyx_L1_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(1, 1265, __pyx_L1_error)

    /* "View.MemoryView":1264
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:
 *     if msg != NULL:             # <<<<<<<<<<<<<<
 *         raise error(msg.decode('ascii'))
 *     else:
 */
  }

  /* "View.MemoryView":1267
 *         raise error(msg.decode('ascii'))
 *     else:
 *         raise error             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_copy_contents')
 */
  /*else*/ {
    __Pyx_Raise(__pyx_v_error, 0, 0, 0);
    __PYX_ERR(1, 1267, __pyx_L1_error)
  }

  /* "View.MemoryView":1263
 * 
 * @cname('__pyx_memoryview_err')
 * cdef int _err(object error, char *msg) except -1 with gil:             # <<<<<<<<<<<<<<
 *     if msg != NULL:
 *         raise error(msg.decode('ascii'))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_XDECREF(__pyx_v_error);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "View.MemoryView":1270
 * 
 * @cname('__pyx_memoryview_copy_contents')
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice dst,
 *                                   int src_ndim, int dst_ndim,
 */

static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
  void *__pyx_v_tmpdata;
  size_t __pyx_v_itemsize;
  int __pyx_v_i;
  char __pyx_v_order;
  int __pyx_v_broadcasting;
  int __pyx_v_direct_copy;
  __Pyx_memviewslice __pyx_v_tmp;
  int __pyx_v_ndim;
  int __pyx_r;
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  void *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "View.MemoryView":1278
 *     Check for overlapping memory and verify the shapes.
 *     """
 *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 */
  __pyx_v_tmpdata = NULL;

  /* "View.MemoryView":1279
 *     """
 *     cdef void *tmpdata = NULL
 *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 */
  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "View.MemoryView":1281
 *     cdef size_t itemsize = src.memview.view.itemsize
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False
 */
  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);

  /* "View.MemoryView":1282
 *     cdef int i
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
 *     cdef bint direct_copy = False
 *     cdef __Pyx_memviewslice tmp
 */
  __pyx_v_broadcasting = 0;

  /* "View.MemoryView":1283
 *     cdef char order = get_best_order(&src, src_ndim)
 *     cdef bint broadcasting = False
 *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
 *     cdef __Pyx_memviewslice tmp
 * 
 */
  __pyx_v_direct_copy = 0;

  /* "View.MemoryView":1286
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 */
  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1287
 * 
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 */
    __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);

    /* "View.MemoryView":1286
 *     cdef __Pyx_memviewslice tmp
 * 
 *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1288
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 */
  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1289
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:
 *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)
 */
    __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);

    /* "View.MemoryView":1288
 *     if src_ndim < dst_ndim:
 *         broadcast_leading(&src, src_ndim, dst_ndim)
 *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 */
  }
  __pyx_L3:;

  /* "View.MemoryView":1291
 *         broadcast_leading(&dst, dst_ndim, src_ndim)
 * 
 *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim):
 */
  __pyx_t_3 = __pyx_v_dst_ndim;
  __pyx_t_4 = __pyx_v_src_ndim;
  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
    __pyx_t_5 = __pyx_t_3;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_v_ndim = __pyx_t_5;

  /* "View.MemoryView":1293
 *     cdef int ndim = max(src_ndim, dst_ndim)
 * 
 *     for i in range(ndim):             # <<<<<<<<<<<<<<
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 */
  __pyx_t_5 = __pyx_v_ndim;
  __pyx_t_3 = __pyx_t_5;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "View.MemoryView":1294
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 */
    __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1295
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
 */
      __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
      if (__pyx_t_2) {

        /* "View.MemoryView":1296
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:
 *                 broadcasting = True             # <<<<<<<<<<<<<<
 *                 src.strides[i] = 0
 *             else:
 */
        __pyx_v_broadcasting = 1;

        /* "View.MemoryView":1297
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 */
        (__pyx_v_src.strides[__pyx_v_i]) = 0;

        /* "View.MemoryView":1295
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:
 *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
 *                 broadcasting = True
 *                 src.strides[i] = 0
 */
        goto __pyx_L7;
      }

      /* "View.MemoryView":1299
 *                 src.strides[i] = 0
 *             else:
 *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
 * 
 *         if src.suboffsets[i] >= 0:
 */
      /*else*/ {
        __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1299, __pyx_L1_error)
      }
      __pyx_L7:;

      /* "View.MemoryView":1294
 * 
 *     for i in range(ndim):
 *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
 *             if src.shape[i] == 1:
 *                 broadcasting = True
 */
    }

    /* "View.MemoryView":1301
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 */
    __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1302
 * 
 *         if src.suboffsets[i] >= 0:
 *             _err_dim(ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 */
      __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1302, __pyx_L1_error)

      /* "View.MemoryView":1301
 *                 _err_extents(i, dst.shape[i], src.shape[i])
 * 
 *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 */
    }
  }

  /* "View.MemoryView":1304
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
 */
  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1306
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
 */
    __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1307
 * 
 *         if not slice_is_contig(src, order, ndim):
 *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 */
      __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);

      /* "View.MemoryView":1306
 *     if slices_overlap(&src, &dst, ndim, itemsize):
 * 
 *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
 *             order = get_best_order(&dst, ndim)
 * 
 */
    }

    /* "View.MemoryView":1309
 *             order = get_best_order(&dst, ndim)
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
 *         src = tmp
 * 
 */
    __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1309, __pyx_L1_error)
    __pyx_v_tmpdata = __pyx_t_7;

    /* "View.MemoryView":1310
 * 
 *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
 *         src = tmp             # <<<<<<<<<<<<<<
 * 
 *     if not broadcasting:
 */
    __pyx_v_src = __pyx_v_tmp;

    /* "View.MemoryView":1304
 *             _err_dim(ValueError, "Dimension %d is not direct", i)
 * 
 *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
 * 
 *         if not slice_is_contig(src, order, ndim):
 */
  }

  /* "View.MemoryView":1312
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
  if (__pyx_t_2) {

    /* "View.MemoryView":1315
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 */
    __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1316
 * 
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 */
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);

      /* "View.MemoryView":1315
 * 
 * 
 *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 */
      goto __pyx_L12;
    }

    /* "View.MemoryView":1317
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 */
    __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1318
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):
 *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
 * 
 *         if direct_copy:
 */
      __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);

      /* "View.MemoryView":1317
 *         if slice_is_contig(src, 'C', ndim):
 *             direct_copy = slice_is_contig(dst, 'C', ndim)
 *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 */
    }
    __pyx_L12:;

    /* "View.MemoryView":1320
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 */
    __pyx_t_2 = (__pyx_v_direct_copy != 0);
    if (__pyx_t_2) {

      /* "View.MemoryView":1322
 *         if direct_copy:
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 */
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

      /* "View.MemoryView":1323
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 *             free(tmpdata)
 */
      (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));

      /* "View.MemoryView":1324
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
 *             free(tmpdata)
 *             return 0
 */
      __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

      /* "View.MemoryView":1325
 *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 *             free(tmpdata)             # <<<<<<<<<<<<<<
 *             return 0
 * 
 */
      free(__pyx_v_tmpdata);

      /* "View.MemoryView":1326
 *             refcount_copying(&dst, dtype_is_object, ndim, True)
 *             free(tmpdata)
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):
 */
      __pyx_r = 0;
      goto __pyx_L0;

      /* "View.MemoryView":1320
 *             direct_copy = slice_is_contig(dst, 'F', ndim)
 * 
 *         if direct_copy:             # <<<<<<<<<<<<<<
 * 
 *             refcount_copying(&dst, dtype_is_object, ndim, False)
 */
    }

    /* "View.MemoryView":1312
 *         src = tmp
 * 
 *     if not broadcasting:             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":1328
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = (__pyx_v_order == 'F');
  if (__pyx_t_2) {
    __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
  }
  __pyx_t_8 = (__pyx_t_2 != 0);
  if (__pyx_t_8) {

    /* "View.MemoryView":1331
 * 
 * 
 *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
 *         transpose_memslice(&dst)
 * 
 */
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1331, __pyx_L1_error)

    /* "View.MemoryView":1332
 * 
 *         transpose_memslice(&src)
 *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, False)
 */
    __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1332, __pyx_L1_error)

    /* "View.MemoryView":1328
 *             return 0
 * 
 *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
 * 
 * 
 */
  }

  /* "View.MemoryView":1334
 *         transpose_memslice(&dst)
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, True)
 */
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1335
 * 
 *     refcount_copying(&dst, dtype_is_object, ndim, False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
 *     refcount_copying(&dst, dtype_is_object, ndim, True)
 * 
 */
  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);

  /* "View.MemoryView":1336
 *     refcount_copying(&dst, dtype_is_object, ndim, False)
 *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
 *     refcount_copying(&dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
 * 
 *     free(tmpdata)
 */
  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1338
 *     refcount_copying(&dst, dtype_is_object, ndim, True)
 * 
 *     free(tmpdata)             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  free(__pyx_v_tmpdata);

  /* "View.MemoryView":1339
 * 
 *     free(tmpdata)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "View.MemoryView":1270
 * 
 * @cname('__pyx_memoryview_copy_contents')
 * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
 *                                   __Pyx_memviewslice dst,
 *                                   int src_ndim, int dst_ndim,
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}

/* "View.MemoryView":1342
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
 *                             int ndim,
 *                             int ndim_other) nogil:
 */

static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
  int __pyx_v_i;
  int __pyx_v_offset;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "View.MemoryView":1346
 *                             int ndim_other) nogil:
 *     cdef int i
 *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
 * 
 *     for i in range(ndim - 1, -1, -1):
 */
  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);

  /* "View.MemoryView":1348
 *     cdef int offset = ndim_other - ndim
 * 
 *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 */
  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
    __pyx_v_i = __pyx_t_1;

    /* "View.MemoryView":1349
 * 
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 */
    (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);

    /* "View.MemoryView":1350
 *     for i in range(ndim - 1, -1, -1):
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 */
    (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);

    /* "View.MemoryView":1351
 *         mslice.shape[i + offset] = mslice.shape[i]
 *         mslice.strides[i + offset] = mslice.strides[i]
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
 * 
 *     for i in range(offset):
 */
    (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
  }

  /* "View.MemoryView":1353
 *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
 * 
 *     for i in range(offset):             # <<<<<<<<<<<<<<
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 */
  __pyx_t_1 = __pyx_v_offset;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1354
 * 
 *     for i in range(offset):
 *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1
 */
    (__pyx_v_mslice->shape[__pyx_v_i]) = 1;

    /* "View.MemoryView":1355
 *     for i in range(offset):
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
 *         mslice.suboffsets[i] = -1
 * 
 */
    (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);

    /* "View.MemoryView":1356
 *         mslice.shape[i] = 1
 *         mslice.strides[i] = mslice.strides[0]
 *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
 * 
 * 
 */
    (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
  }

  /* "View.MemoryView":1342
 * 
 * @cname('__pyx_memoryview_broadcast_leading')
 * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
 *                             int ndim,
 *                             int ndim_other) nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1364
 * 
 * @cname('__pyx_memoryview_refcount_copying')
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
 *                            int ndim, bint inc) nogil:
 * 
 */

static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
  int __pyx_t_1;

  /* "View.MemoryView":1368
 * 
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
 *                                            dst.strides, ndim, inc)
 */
  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1369
 * 
 *     if dtype_is_object:
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,             # <<<<<<<<<<<<<<
 *                                            dst.strides, ndim, inc)
 * 
 */
    __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);

    /* "View.MemoryView":1368
 * 
 * 
 *     if dtype_is_object:             # <<<<<<<<<<<<<<
 *         refcount_objects_in_slice_with_gil(dst.data, dst.shape,
 *                                            dst.strides, ndim, inc)
 */
  }

  /* "View.MemoryView":1364
 * 
 * @cname('__pyx_memoryview_refcount_copying')
 * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object,             # <<<<<<<<<<<<<<
 *                            int ndim, bint inc) nogil:
 * 
 */

  /* function exit code */
}

/* "View.MemoryView":1373
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) with gil:
 */

static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  __Pyx_RefNannyDeclarations
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);

  /* "View.MemoryView":1376
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) with gil:
 *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 */
  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);

  /* "View.MemoryView":1373
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
 * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                              Py_ssize_t *strides, int ndim,
 *                                              bint inc) with gil:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
}

/* "View.MemoryView":1379
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                     Py_ssize_t *strides, int ndim, bint inc):
 *     cdef Py_ssize_t i
 */

static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);

  /* "View.MemoryView":1383
 *     cdef Py_ssize_t i
 * 
 *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
 *         if ndim == 1:
 *             if inc:
 */
  __pyx_t_1 = (__pyx_v_shape[0]);
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "View.MemoryView":1384
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
 */
    __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
    if (__pyx_t_4) {

      /* "View.MemoryView":1385
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 */
      __pyx_t_4 = (__pyx_v_inc != 0);
      if (__pyx_t_4) {

        /* "View.MemoryView":1386
 *         if ndim == 1:
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])
 */
        Py_INCREF((((PyObject **)__pyx_v_data)[0]));

        /* "View.MemoryView":1385
 *     for i in range(shape[0]):
 *         if ndim == 1:
 *             if inc:             # <<<<<<<<<<<<<<
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 */
        goto __pyx_L6;
      }

      /* "View.MemoryView":1388
 *                 Py_INCREF((<PyObject **> data)[0])
 *             else:
 *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1,
 */
      /*else*/ {
        Py_DECREF((((PyObject **)__pyx_v_data)[0]));
      }
      __pyx_L6:;

      /* "View.MemoryView":1384
 * 
 *     for i in range(shape[0]):
 *         if ndim == 1:             # <<<<<<<<<<<<<<
 *             if inc:
 *                 Py_INCREF((<PyObject **> data)[0])
 */
      goto __pyx_L5;
    }

    /* "View.MemoryView":1390
 *                 Py_DECREF((<PyObject **> data)[0])
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
 *                                       ndim - 1, inc)
 * 
 */
    /*else*/ {

      /* "View.MemoryView":1391
 *         else:
 *             refcount_objects_in_slice(data, shape + 1, strides + 1,
 *                                       ndim - 1, inc)             # <<<<<<<<<<<<<<
 * 
 *         data += strides[0]
 */
      __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
    }
    __pyx_L5:;

    /* "View.MemoryView":1393
 *                                       ndim - 1, inc)
 * 
 *         data += strides[0]             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
  }

  /* "View.MemoryView":1379
 * 
 * @cname('__pyx_memoryview_refcount_objects_in_slice')
 * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                                     Py_ssize_t *strides, int ndim, bint inc):
 *     cdef Py_ssize_t i
 */

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

/* "View.MemoryView":1399
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) nogil:
 */

static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {

  /* "View.MemoryView":1402
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, False)             # <<<<<<<<<<<<<<
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
 *                          itemsize, item)
 */
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);

  /* "View.MemoryView":1403
 *                               bint dtype_is_object) nogil:
 *     refcount_copying(dst, dtype_is_object, ndim, False)
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,             # <<<<<<<<<<<<<<
 *                          itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, True)
 */
  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);

  /* "View.MemoryView":1405
 *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
 *                          itemsize, item)
 *     refcount_copying(dst, dtype_is_object, ndim, True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);

  /* "View.MemoryView":1399
 * 
 * @cname('__pyx_memoryview_slice_assign_scalar')
 * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
 *                               size_t itemsize, void *item,
 *                               bint dtype_is_object) nogil:
 */

  /* function exit code */
}

/* "View.MemoryView":1409
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                               Py_ssize_t *strides, int ndim,
 *                               size_t itemsize, void *item) nogil:
 */

static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_stride;
  Py_ssize_t __pyx_v_extent;
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;

  /* "View.MemoryView":1413
 *                               size_t itemsize, void *item) nogil:
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t extent = shape[0]
 * 
 */
  __pyx_v_stride = (__pyx_v_strides[0]);

  /* "View.MemoryView":1414
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t stride = strides[0]
 *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
 * 
 *     if ndim == 1:
 */
  __pyx_v_extent = (__pyx_v_shape[0]);

  /* "View.MemoryView":1416
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 */
  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
  if (__pyx_t_1) {

    /* "View.MemoryView":1417
 * 
 *     if ndim == 1:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             memcpy(data, item, itemsize)
 *             data += stride
 */
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1418
 *     if ndim == 1:
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
 *             data += stride
 *     else:
 */
      (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));

      /* "View.MemoryView":1419
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 *             data += stride             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(extent):
 */
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }

    /* "View.MemoryView":1416
 *     cdef Py_ssize_t extent = shape[0]
 * 
 *     if ndim == 1:             # <<<<<<<<<<<<<<
 *         for i in range(extent):
 *             memcpy(data, item, itemsize)
 */
    goto __pyx_L3;
  }

  /* "View.MemoryView":1421
 *             data += stride
 *     else:
 *         for i in range(extent):             # <<<<<<<<<<<<<<
 *             _slice_assign_scalar(data, shape + 1, strides + 1,
 *                                 ndim - 1, itemsize, item)
 */
  /*else*/ {
    __pyx_t_2 = __pyx_v_extent;
    __pyx_t_3 = __pyx_t_2;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "View.MemoryView":1422
 *     else:
 *         for i in range(extent):
 *             _slice_assign_scalar(data, shape + 1, strides + 1,             # <<<<<<<<<<<<<<
 *                                 ndim - 1, itemsize, item)
 *             data += stride
 */
      __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);

      /* "View.MemoryView":1424
 *             _slice_assign_scalar(data, shape + 1, strides + 1,
 *                                 ndim - 1, itemsize, item)
 *             data += stride             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
    }
  }
  __pyx_L3:;

  /* "View.MemoryView":1409
 * 
 * @cname('__pyx_memoryview__slice_assign_scalar')
 * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
 *                               Py_ssize_t *strides, int ndim,
 *                               size_t itemsize, void *item) nogil:
 */

  /* function exit code */
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (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_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__48, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_17, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
 *     __pyx_result = Enum.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __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_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->name);
  __Pyx_DECREF(__pyx_v___pyx_result->name);
  __pyx_v___pyx_result->name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *p;
  PyObject *o;
  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_6coders_10coder_impl_CoderImpl *)o);
  p->__pyx_vtab = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl;
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_CoderImpl[] = {
  {"encode_all", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all, METH_O, 0},
  {"decode_all", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.CoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SimpleCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SimpleCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_SimpleCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.SimpleCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SimpleCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  Subclass of CoderImpl implementing stream methods using encode/decode.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_SimpleCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_SimpleCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_StreamCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.StreamCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_StreamCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  Subclass of CoderImpl implementing encode/decode using stream methods.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_StreamCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CallbackCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl;
  p->_encoder = Py_None; Py_INCREF(Py_None);
  p->_decoder = Py_None; Py_INCREF(Py_None);
  p->_size_estimator = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_encoder);
  Py_CLEAR(p->_decoder);
  Py_CLEAR(p->_size_estimator);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_CallbackCoderImpl)); if (e) return e;
  if (p->_encoder) {
    e = (*v)(p->_encoder, a); if (e) return e;
  }
  if (p->_decoder) {
    e = (*v)(p->_decoder, a); if (e) return e;
  }
  if (p->_size_estimator) {
    e = (*v)(p->_size_estimator, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_CallbackCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);
  tmp = ((PyObject*)p->_encoder);
  p->_encoder = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_decoder);
  p->_decoder = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_size_estimator);
  p->_size_estimator = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_CallbackCoderImpl[] = {
  {"_default_size_estimator", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.CallbackCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A CoderImpl that calls back to the _impl methods on the Coder itself.\n\n  This is the default implementation used if Coder._get_impl()\n  is not overwritten.\n  ", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_CallbackCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl;
  p->fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  p->iterable_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  p->requires_deterministic_step_label = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->fallback_coder_impl);
  Py_CLEAR(p->iterable_coder_impl);
  Py_CLEAR(p->requires_deterministic_step_label);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl)); if (e) return e;
  if (p->fallback_coder_impl) {
    e = (*v)(((PyObject *)p->fallback_coder_impl), a); if (e) return e;
  }
  if (p->iterable_coder_impl) {
    e = (*v)(((PyObject *)p->iterable_coder_impl), a); if (e) return e;
  }
  if (p->requires_deterministic_step_label) {
    e = (*v)(p->requires_deterministic_step_label, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);
  tmp = ((PyObject*)p->fallback_coder_impl);
  p->fallback_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->iterable_coder_impl);
  p->iterable_coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->requires_deterministic_step_label);
  p->requires_deterministic_step_label = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl[] = {
  {"register_iterable_like_type", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type, METH_VARARGS|METH_KEYWORDS, 0},
  {"_deterministic_encoding_error_msg", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.FastPrimitivesCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_MapCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl;
  p->_key_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_key_coder);
  Py_CLEAR(p->_value_coder);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_MapCoderImpl)); if (e) return e;
  if (p->_key_coder) {
    e = (*v)(((PyObject *)p->_key_coder), a); if (e) return e;
  }
  if (p->_value_coder) {
    e = (*v)(((PyObject *)p->_value_coder), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_MapCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_MapCoderImpl);
  tmp = ((PyObject*)p->_key_coder);
  p->_key_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_value_coder);
  p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_MapCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.MapCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_MapCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  Note this implementation always uses nested context when encoding keys\n  and values. This differs from Java's MapCoder, which uses\n  nested=False if possible for the last value encoded.\n\n  This difference is acceptable because MapCoder is not standard. It is only\n  used in a standard context by RowCoder which always uses nested context for\n  attribute values.\n\n  A coder for typing.Mapping objects.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_12MapCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_MapCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BytesCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BytesCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_BytesCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.BytesCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for bytes/str objects.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_BytesCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_BytesCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BooleanCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BooleanCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_BooleanCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.BooleanCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BooleanCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for bool objects.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_BooleanCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.BigEndianShortCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.SinglePrecisionFloatCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FloatCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_FloatCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_FloatCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.FloatCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FloatCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_FloatCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_FloatCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TimestampCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl;
  p->timestamp_class = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->timestamp_class);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_TimestampCoderImpl)); if (e) return e;
  if (p->timestamp_class) {
    e = (*v)(p->timestamp_class, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_TimestampCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_TimestampCoderImpl);
  tmp = ((PyObject*)p->timestamp_class);
  p->timestamp_class = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_TimestampCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.TimestampCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TimestampCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  TODO: SDK agnostic encoding\n  For interoperability with Java SDK, encoding needs to match\n  that of the Java SDK InstantCoder.\n  https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79\n  ", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_TimestampCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_VarIntCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_VarIntCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_VarIntCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.VarIntCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_VarIntCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for int objects.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_VarIntCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SingletonCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_CoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl;
  p->_value = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_value);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SingletonCoderImpl)); if (e) return e;
  if (p->_value) {
    e = (*v)(p->_value, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SingletonCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);
  tmp = ((PyObject*)p->_value);
  p->_value = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_SingletonCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.SingletonCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SingletonCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder that always encodes exactly one value.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_SingletonCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl;
  p->_coder_impls = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_coder_impls);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl)); if (e) return e;
  if (p->_coder_impls) {
    e = (*v)(p->_coder_impls, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);
  tmp = ((PyObject*)p->_coder_impls);
  p->_coder_impls = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.AbstractComponentCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  CoderImpl for coders that are comprised of several component coders.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_TupleCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.TupleCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "A coder for tuple objects.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_TupleCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
  p->_elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  p->_read_state = Py_None; Py_INCREF(Py_None);
  p->_write_state = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_elem_coder);
  Py_CLEAR(p->_read_state);
  Py_CLEAR(p->_write_state);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl)); if (e) return e;
  if (p->_elem_coder) {
    e = (*v)(((PyObject *)p->_elem_coder), a); if (e) return e;
  }
  if (p->_read_state) {
    e = (*v)(p->_read_state, a); if (e) return e;
  }
  if (p->_write_state) {
    e = (*v)(p->_write_state, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);
  tmp = ((PyObject*)p->_elem_coder);
  p->_elem_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_read_state);
  p->_read_state = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_write_state);
  p->_write_state = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_SequenceCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.SequenceCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for sequences.\n\n  If the length of the sequence in known we encode the length as a 32 bit\n  ``int`` followed by the encoded bytes.\n\n  If the length of the sequence is unknown, we encode the length as ``-1``\n  followed by the encoding of elements buffered up to 64K bytes before prefixing\n  the count of number of elements. A ``0`` is encoded at the end to indicate the\n  end of stream.\n\n  The resulting encoding would look like this::\n\n    -1\n    countA element(0) element(1) ... element(countA - 1)\n    countB element(0) element(1) ... element(countB - 1)\n    ...\n    countX element(0) element(1) ... element(countX - 1)\n    0\n\n  If writing to state is enabled, the final terminating 0 will instead be\n  repaced with::\n\n    varInt64(-1)\n    len(state_token)\n    state_token\n\n  where state_token is a bytes object used to retrieve the remainder of the\n  iterable via the state API.\n  ", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.TupleSequenceCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for homogeneous tuple objects.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl__AbstractIterable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *p;
  PyObject *o;
  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_6coders_10coder_impl__AbstractIterable *)o);
  p->_contents = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__AbstractIterable(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_contents);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl__AbstractIterable(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable *)o;
  tmp = ((PyObject*)p->_contents);
  p->_contents = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_richcompare_11apache_beam_6coders_10coder_impl__AbstractIterable(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_7__eq__(o1, o2);
    }
    case Py_NE: {
      PyObject *ret;
      ret = __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_7__eq__(o1, o2);
      if (likely(ret && ret != Py_NotImplemented)) {
        int b = __Pyx_PyObject_IsTrue(ret); Py_DECREF(ret);
        if (unlikely(b < 0)) return NULL;
        ret = (b) ? Py_False : Py_True;
        Py_INCREF(ret);
      }
      return ret;
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl__AbstractIterable[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl._AbstractIterable", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl__AbstractIterable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Wraps an iterable hiding methods that might not always be available.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_clear*/
  __pyx_tp_richcompare_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_3__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_17_AbstractIterable_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl__AbstractIterable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IterableCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_IterableCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_IterableCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_IterableCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.IterableCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for homogeneous iterable objects.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_IterableCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_IterableCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ListCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_ListCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_ListCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_SequenceCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_ListCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.ListCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ListCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for homogeneous list objects.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_SequenceCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_ListCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_ListCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.IntervalWindowCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.PaneInfoCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  Coder for a PaneInfo descriptor.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;
  p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  p->_timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  p->_windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  p->_pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_value_coder);
  Py_CLEAR(p->_timestamp_coder);
  Py_CLEAR(p->_windows_coder);
  Py_CLEAR(p->_pane_info_coder);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl)); if (e) return e;
  if (p->_value_coder) {
    e = (*v)(((PyObject *)p->_value_coder), a); if (e) return e;
  }
  if (p->_timestamp_coder) {
    e = (*v)(((PyObject *)p->_timestamp_coder), a); if (e) return e;
  }
  if (p->_windows_coder) {
    e = (*v)(((PyObject *)p->_windows_coder), a); if (e) return e;
  }
  if (p->_pane_info_coder) {
    e = (*v)(((PyObject *)p->_pane_info_coder), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);
  tmp = ((PyObject*)p->_value_coder);
  p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_timestamp_coder);
  p->_timestamp_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_windows_coder);
  p->_windows_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pane_info_coder);
  p->_pane_info_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.WindowedValueCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for windowed values.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl;
  p->_windows = Py_None; Py_INCREF(Py_None);
  p->_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_windows);
  Py_CLEAR(p->_pane_info);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)o;
  e = __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(o, v, a); if (e) return e;
  if (p->_windows) {
    e = (*v)(p->_windows, a); if (e) return e;
  }
  if (p->_pane_info) {
    e = (*v)(((PyObject *)p->_pane_info), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl *)o;
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl(o);
  tmp = ((PyObject*)p->_windows);
  p->_windows = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pane_info);
  p->_pane_info = ((struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__timestamp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_timestamp_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__windows(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_8_windows_1__get__(o);
}

static PyObject *__pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__pane_info(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_10_pane_info_1__get__(o);
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl[] = {
  {"_from_proto", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl[] = {
  {(char *)"_timestamp", __pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__timestamp, 0, (char *)0, 0},
  {(char *)"_windows", __pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__windows, 0, (char *)0, 0},
  {(char *)"_pane_info", __pyx_getprop_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl__pane_info, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.ParamWindowedValueCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for windowed values with constant timestamp, windows and\n  pane info. The coder drops timestamp, windows and pane info during\n  encoding, and uses the supplied parameterized timestamp, windows\n  and pane info values during decoding when reconstructing the windowed\n  value.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl;
  p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_value_coder);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl)); if (e) return e;
  if (p->_value_coder) {
    e = (*v)(((PyObject *)p->_value_coder), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl);
  tmp = ((PyObject*)p->_value_coder);
  p->_value_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.LengthPrefixCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  Coder which prefixes the length of the encoded object in the stream.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder __pyx_vtable_11apache_beam_6coders_10coder_impl_RowColumnEncoder;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowColumnEncoder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *p;
  PyObject *o;
  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_6coders_10coder_impl_RowColumnEncoder *)o);
  p->__pyx_vtab = __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder;
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowColumnEncoder(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_RowColumnEncoder[] = {
  {"register", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register, METH_VARARGS|METH_KEYWORDS, 0},
  {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create, METH_VARARGS|METH_KEYWORDS, 0},
  {"null_flags", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags, METH_NOARGS, 0},
  {"finalize_write", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.RowColumnEncoder", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowColumnEncoder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_RowColumnEncoder, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_RowColumnEncoder, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder __pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_RowColumnEncoder(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowColumnEncoder*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder;
  p->column = Py_None; Py_INCREF(Py_None);
  p->coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->column);
  Py_CLEAR(p->coder_impl);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowColumnEncoder(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder)); if (e) return e;
  if (p->column) {
    e = (*v)(p->column, a); if (e) return e;
  }
  if (p->coder_impl) {
    e = (*v)(((PyObject *)p->coder_impl), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder);
  tmp = ((PyObject*)p->column);
  p->column = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->coder_impl);
  p->coder_impl = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder[] = {
  {"null_flags", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags, METH_NOARGS, 0},
  {"finalize_write", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.GenericRowColumnEncoder", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_RowCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl;
  p->schema = Py_None; Py_INCREF(Py_None);
  p->field_names = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->field_nullable = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->constructor = Py_None; Py_INCREF(Py_None);
  p->encoding_positions = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->encoding_positions_argsort = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->components = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->schema);
  Py_CLEAR(p->field_names);
  Py_CLEAR(p->field_nullable);
  Py_CLEAR(p->constructor);
  Py_CLEAR(p->encoding_positions);
  Py_CLEAR(p->encoding_positions_argsort);
  Py_CLEAR(p->components);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_RowCoderImpl)); if (e) return e;
  if (p->schema) {
    e = (*v)(p->schema, a); if (e) return e;
  }
  if (p->field_names) {
    e = (*v)(p->field_names, a); if (e) return e;
  }
  if (p->field_nullable) {
    e = (*v)(p->field_nullable, a); if (e) return e;
  }
  if (p->constructor) {
    e = (*v)(p->constructor, a); if (e) return e;
  }
  if (p->encoding_positions) {
    e = (*v)(p->encoding_positions, a); if (e) return e;
  }
  if (p->encoding_positions_argsort) {
    e = (*v)(p->encoding_positions_argsort, a); if (e) return e;
  }
  if (p->components) {
    e = (*v)(p->components, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_RowCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_RowCoderImpl);
  tmp = ((PyObject*)p->schema);
  p->schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->field_names);
  p->field_names = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->field_nullable);
  p->field_nullable = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->constructor);
  p->constructor = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->encoding_positions);
  p->encoding_positions = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->encoding_positions_argsort);
  p->encoding_positions_argsort = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->components);
  p->components = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_RowCoderImpl[] = {
  {"_row_column_encoders", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.RowCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.", /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_12RowCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_RowCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl;
  p->logical_type = Py_None; Py_INCREF(Py_None);
  p->representation_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->logical_type);
  Py_CLEAR(p->representation_coder);
  if (PyType_IS_GC(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)o;
  e = ((likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) ? ((__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse) ? __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl)); if (e) return e;
  if (p->logical_type) {
    e = (*v)(p->logical_type, a); if (e) return e;
  }
  if (p->representation_coder) {
    e = (*v)(((PyObject *)p->representation_coder), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl *)o;
  if (likely(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl)) { if (__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear) __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl);
  tmp = ((PyObject*)p->logical_type);
  p->logical_type = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->representation_coder);
  p->representation_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.LogicalTypeCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.BigIntegerCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  For interoperability with Java SDK, encoding needs to match that of the Java\n  SDK BigIntegerCoder.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DecimalCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_DecimalCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *p;
  PyObject *o = __pyx_tp_new_11apache_beam_6coders_10coder_impl_StreamCoderImpl(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl;
  return o;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_DecimalCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.DecimalCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DecimalCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  For interoperability with Java SDK, encoding needs to match that of the Java\n  SDK BigDecimalCoder.", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_DecimalCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all[8];
static int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all = 0;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all[--__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all));
    (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_6coders_10coder_impl___pyx_scope_struct__decode_all(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_encoded);
  Py_CLEAR(p->__pyx_v_input_stream);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all)))) {
    __pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all[__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.__pyx_scope_struct__decode_all", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type[8];
static int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type = 0;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type[--__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type));
    (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_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_bs);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type)))) {
    __pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type[__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type *)o;
  tmp = ((PyObject*)p->__pyx_v_bs);
  p->__pyx_v_bs = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.__pyx_scope_struct_1__unpickle_type", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type, /*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_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__[8];
static int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ = 0;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__[--__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__));
    (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_6coders_10coder_impl___pyx_scope_struct_2___iter__(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_elem);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__)))) {
    __pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__[__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.__pyx_scope_struct_2___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__[8];
static int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ = 0;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__[--__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___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_6coders_10coder_impl___pyx_scope_struct_3___init__(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_components);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__)))) {
    __pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__[__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

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

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ *)o;
  tmp = ((PyObject*)p->__pyx_v_components);
  p->__pyx_v_components = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.__pyx_scope_struct_3___init__", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___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_6coders_10coder_impl___pyx_scope_struct_3___init__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr[8];
static int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr = 0;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr[--__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_field);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr)))) {
    __pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr[__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_field) {
    e = (*v)(p->__pyx_v_field, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.__pyx_scope_struct_4_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr[8];
static int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr = 0;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr[--__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_field);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr)))) {
    __pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr[__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_field) {
    e = (*v)(p->__pyx_v_field, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.__pyx_scope_struct_5_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr[8];
static int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr = 0;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr[--__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_i);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr)))) {
    __pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr[__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_i) {
    e = (*v)(p->__pyx_v_i, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.__pyx_scope_struct_6_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr[8];
static int __pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr = 0;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr)))) {
    o = (PyObject*)__pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr[--__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_field);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr)))) {
    __pyx_freelist_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr[__pyx_freecount_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_field) {
    e = (*v)(p->__pyx_v_field, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.__pyx_scope_struct_7_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_array __pyx_vtable_array;

static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_array_obj *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_array_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_array;
  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_array(PyObject *o) {
  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_array___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->mode);
  Py_CLEAR(p->_format);
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_array___setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_array___getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
}

static PyMethodDef __pyx_methods_array[] = {
  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_array[] = {
  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_array = {
  __pyx_array___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_array, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_array = {
  __pyx_array___len__, /*mp_length*/
  __pyx_array___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_array = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_array_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_array = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.array", /*tp_name*/
  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_array, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  __pyx_tp_getattro_array, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_array, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_array, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_array, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_MemviewEnum_obj *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_MemviewEnum_obj *)o);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_Enum(PyObject *o) {
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->name);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_Enum(PyObject *o) {
  PyObject* tmp;
  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_Enum[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type___pyx_MemviewEnum = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.Enum", /*tp_name*/
  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_MemviewEnum___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_Enum, /*tp_traverse*/
  __pyx_tp_clear_Enum, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_Enum, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_MemviewEnum___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_Enum, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;

static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryview_obj *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_memoryview_obj *)o);
  p->__pyx_vtab = __pyx_vtabptr_memoryview;
  p->obj = Py_None; Py_INCREF(Py_None);
  p->_size = Py_None; Py_INCREF(Py_None);
  p->_array_interface = Py_None; Py_INCREF(Py_None);
  p->view.obj = NULL;
  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_memoryview(PyObject *o) {
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_memoryview___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->obj);
  Py_CLEAR(p->_size);
  Py_CLEAR(p->_array_interface);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  if (p->obj) {
    e = (*v)(p->obj, a); if (e) return e;
  }
  if (p->_size) {
    e = (*v)(p->_size, a); if (e) return e;
  }
  if (p->_array_interface) {
    e = (*v)(p->_array_interface, a); if (e) return e;
  }
  if (p->view.obj) {
    e = (*v)(p->view.obj, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_memoryview(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
  tmp = ((PyObject*)p->obj);
  p->obj = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_size);
  p->_size = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_array_interface);
  p->_array_interface = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  Py_CLEAR(p->view.obj);
  return 0;
}
static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_memoryview___setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
}

static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
}

static PyMethodDef __pyx_methods_memoryview[] = {
  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_memoryview[] = {
  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
  __pyx_memoryview___len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_memoryview, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
  __pyx_memoryview___len__, /*mp_length*/
  __pyx_memoryview___getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
  0, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type___pyx_memoryview = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.memoryview", /*tp_name*/
  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_memoryview___repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_memoryview___str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_memoryview, /*tp_traverse*/
  __pyx_tp_clear_memoryview, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_memoryview, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_memoryview, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_memoryview, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;

static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_memoryviewslice_obj *p;
  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_memoryviewslice_obj *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
  p->from_object = Py_None; Py_INCREF(Py_None);
  p->from_slice.memview = NULL;
  return o;
}

static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_memoryviewslice___dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->from_object);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_memoryview(o);
}

static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
  if (p->from_object) {
    e = (*v)(p->from_object, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
  PyObject* tmp;
  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
  __pyx_tp_clear_memoryview(o);
  tmp = ((PyObject*)p->from_object);
  p->from_object = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
  return 0;
}

static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
}

static PyMethodDef __pyx_methods__memoryviewslice[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type___pyx_memoryviewslice = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl._memoryviewslice", /*tp_name*/
  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_memoryview___repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_memoryview___str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Internal class for passing memoryview slices to Python", /*tp_doc*/
  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods__memoryviewslice, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets__memoryviewslice, /*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__memoryviewslice, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_coder_impl(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_coder_impl},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "coder_impl",
    __pyx_k_Coder_implementations_The_actual, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractComponentCoderImpl, __pyx_k_AbstractComponentCoderImpl, sizeof(__pyx_k_AbstractComponentCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractComponentCoderImpl___red, __pyx_k_AbstractComponentCoderImpl___red, sizeof(__pyx_k_AbstractComponentCoderImpl___red), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractComponentCoderImpl___set, __pyx_k_AbstractComponentCoderImpl___set, sizeof(__pyx_k_AbstractComponentCoderImpl___set), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractComponentCoderImpl__cons, __pyx_k_AbstractComponentCoderImpl__cons, sizeof(__pyx_k_AbstractComponentCoderImpl__cons), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractComponentCoderImpl__extr, __pyx_k_AbstractComponentCoderImpl__extr, sizeof(__pyx_k_AbstractComponentCoderImpl__extr), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractComponentCoderImpl_decod, __pyx_k_AbstractComponentCoderImpl_decod, sizeof(__pyx_k_AbstractComponentCoderImpl_decod), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractComponentCoderImpl_encod, __pyx_k_AbstractComponentCoderImpl_encod, sizeof(__pyx_k_AbstractComponentCoderImpl_encod), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractComponentCoderImpl_estim, __pyx_k_AbstractComponentCoderImpl_estim, sizeof(__pyx_k_AbstractComponentCoderImpl_estim), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractComponentCoderImpl_get_e, __pyx_k_AbstractComponentCoderImpl_get_e, sizeof(__pyx_k_AbstractComponentCoderImpl_get_e), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractIterable, __pyx_k_AbstractIterable, sizeof(__pyx_k_AbstractIterable), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractIterable___reduce_cytho, __pyx_k_AbstractIterable___reduce_cytho, sizeof(__pyx_k_AbstractIterable___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_AbstractIterable___setstate_cyt, __pyx_k_AbstractIterable___setstate_cyt, sizeof(__pyx_k_AbstractIterable___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_kp_u_AbstractIterable_s, __pyx_k_AbstractIterable_s, sizeof(__pyx_k_AbstractIterable_s), 0, 1, 0, 0},
  {&__pyx_n_s_Any, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1},
  {&__pyx_kp_u_Attempted_to_encode_null_for_non, __pyx_k_Attempted_to_encode_null_for_non, sizeof(__pyx_k_Attempted_to_encode_null_for_non), 0, 1, 0, 0},
  {&__pyx_n_s_AvroCoderImpl, __pyx_k_AvroCoderImpl, sizeof(__pyx_k_AvroCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_AvroCoderImpl___init, __pyx_k_AvroCoderImpl___init, sizeof(__pyx_k_AvroCoderImpl___init), 0, 0, 1, 1},
  {&__pyx_n_s_AvroCoderImpl_decode, __pyx_k_AvroCoderImpl_decode, sizeof(__pyx_k_AvroCoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_AvroCoderImpl_encode, __pyx_k_AvroCoderImpl_encode, sizeof(__pyx_k_AvroCoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_AvroRecord, __pyx_k_AvroRecord, sizeof(__pyx_k_AvroRecord), 0, 0, 1, 1},
  {&__pyx_n_s_BIG_INT_CODER_IMPL, __pyx_k_BIG_INT_CODER_IMPL, sizeof(__pyx_k_BIG_INT_CODER_IMPL), 0, 0, 1, 1},
  {&__pyx_n_s_BOOL_TYPE, __pyx_k_BOOL_TYPE, sizeof(__pyx_k_BOOL_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_BYTES_TYPE, __pyx_k_BYTES_TYPE, sizeof(__pyx_k_BYTES_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_BigEndianShortCoderImpl, __pyx_k_BigEndianShortCoderImpl, sizeof(__pyx_k_BigEndianShortCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_BigEndianShortCoderImpl___reduce, __pyx_k_BigEndianShortCoderImpl___reduce, sizeof(__pyx_k_BigEndianShortCoderImpl___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_BigEndianShortCoderImpl___setsta, __pyx_k_BigEndianShortCoderImpl___setsta, sizeof(__pyx_k_BigEndianShortCoderImpl___setsta), 0, 0, 1, 1},
  {&__pyx_n_s_BigEndianShortCoderImpl_decode_f, __pyx_k_BigEndianShortCoderImpl_decode_f, sizeof(__pyx_k_BigEndianShortCoderImpl_decode_f), 0, 0, 1, 1},
  {&__pyx_n_s_BigEndianShortCoderImpl_encode_t, __pyx_k_BigEndianShortCoderImpl_encode_t, sizeof(__pyx_k_BigEndianShortCoderImpl_encode_t), 0, 0, 1, 1},
  {&__pyx_n_s_BigEndianShortCoderImpl_estimate, __pyx_k_BigEndianShortCoderImpl_estimate, sizeof(__pyx_k_BigEndianShortCoderImpl_estimate), 0, 0, 1, 1},
  {&__pyx_n_s_BigIntegerCoderImpl, __pyx_k_BigIntegerCoderImpl, sizeof(__pyx_k_BigIntegerCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_BigIntegerCoderImpl___reduce_cyt, __pyx_k_BigIntegerCoderImpl___reduce_cyt, sizeof(__pyx_k_BigIntegerCoderImpl___reduce_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_BigIntegerCoderImpl___setstate_c, __pyx_k_BigIntegerCoderImpl___setstate_c, sizeof(__pyx_k_BigIntegerCoderImpl___setstate_c), 0, 0, 1, 1},
  {&__pyx_n_s_BigIntegerCoderImpl_decode_from, __pyx_k_BigIntegerCoderImpl_decode_from, sizeof(__pyx_k_BigIntegerCoderImpl_decode_from), 0, 0, 1, 1},
  {&__pyx_n_s_BigIntegerCoderImpl_encode_to_st, __pyx_k_BigIntegerCoderImpl_encode_to_st, sizeof(__pyx_k_BigIntegerCoderImpl_encode_to_st), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanCoderImpl, __pyx_k_BooleanCoderImpl, sizeof(__pyx_k_BooleanCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanCoderImpl___reduce_cython, __pyx_k_BooleanCoderImpl___reduce_cython, sizeof(__pyx_k_BooleanCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanCoderImpl___setstate_cyth, __pyx_k_BooleanCoderImpl___setstate_cyth, sizeof(__pyx_k_BooleanCoderImpl___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanCoderImpl_decode, __pyx_k_BooleanCoderImpl_decode, sizeof(__pyx_k_BooleanCoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanCoderImpl_decode_from_str, __pyx_k_BooleanCoderImpl_decode_from_str, sizeof(__pyx_k_BooleanCoderImpl_decode_from_str), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanCoderImpl_encode, __pyx_k_BooleanCoderImpl_encode, sizeof(__pyx_k_BooleanCoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanCoderImpl_encode_to_strea, __pyx_k_BooleanCoderImpl_encode_to_strea, sizeof(__pyx_k_BooleanCoderImpl_encode_to_strea), 0, 0, 1, 1},
  {&__pyx_n_s_BooleanCoderImpl_estimate_size, __pyx_k_BooleanCoderImpl_estimate_size, sizeof(__pyx_k_BooleanCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
  {&__pyx_n_s_ByteCountingOutputStream, __pyx_k_ByteCountingOutputStream, sizeof(__pyx_k_ByteCountingOutputStream), 0, 0, 1, 1},
  {&__pyx_n_u_ByteCountingOutputStream, __pyx_k_ByteCountingOutputStream, sizeof(__pyx_k_ByteCountingOutputStream), 0, 1, 0, 1},
  {&__pyx_n_s_BytesCoderImpl, __pyx_k_BytesCoderImpl, sizeof(__pyx_k_BytesCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_BytesCoderImpl___reduce_cython, __pyx_k_BytesCoderImpl___reduce_cython, sizeof(__pyx_k_BytesCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BytesCoderImpl___setstate_cython, __pyx_k_BytesCoderImpl___setstate_cython, sizeof(__pyx_k_BytesCoderImpl___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_BytesCoderImpl_decode, __pyx_k_BytesCoderImpl_decode, sizeof(__pyx_k_BytesCoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_BytesCoderImpl_decode_from_strea, __pyx_k_BytesCoderImpl_decode_from_strea, sizeof(__pyx_k_BytesCoderImpl_decode_from_strea), 0, 0, 1, 1},
  {&__pyx_n_s_BytesCoderImpl_encode, __pyx_k_BytesCoderImpl_encode, sizeof(__pyx_k_BytesCoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_BytesCoderImpl_encode_to_stream, __pyx_k_BytesCoderImpl_encode_to_stream, sizeof(__pyx_k_BytesCoderImpl_encode_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_BytesIO, __pyx_k_BytesIO, sizeof(__pyx_k_BytesIO), 0, 0, 1, 1},
  {&__pyx_n_s_Callable, __pyx_k_Callable, sizeof(__pyx_k_Callable), 0, 0, 1, 1},
  {&__pyx_n_s_CallbackCoderImpl, __pyx_k_CallbackCoderImpl, sizeof(__pyx_k_CallbackCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_CallbackCoderImpl___reduce_cytho, __pyx_k_CallbackCoderImpl___reduce_cytho, sizeof(__pyx_k_CallbackCoderImpl___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_CallbackCoderImpl___setstate_cyt, __pyx_k_CallbackCoderImpl___setstate_cyt, sizeof(__pyx_k_CallbackCoderImpl___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_CallbackCoderImpl__default_size, __pyx_k_CallbackCoderImpl__default_size, sizeof(__pyx_k_CallbackCoderImpl__default_size), 0, 0, 1, 1},
  {&__pyx_n_s_CallbackCoderImpl_decode, __pyx_k_CallbackCoderImpl_decode, sizeof(__pyx_k_CallbackCoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_CallbackCoderImpl_decode_from_st, __pyx_k_CallbackCoderImpl_decode_from_st, sizeof(__pyx_k_CallbackCoderImpl_decode_from_st), 0, 0, 1, 1},
  {&__pyx_n_s_CallbackCoderImpl_encode, __pyx_k_CallbackCoderImpl_encode, sizeof(__pyx_k_CallbackCoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_CallbackCoderImpl_encode_to_stre, __pyx_k_CallbackCoderImpl_encode_to_stre, sizeof(__pyx_k_CallbackCoderImpl_encode_to_stre), 0, 0, 1, 1},
  {&__pyx_kp_u_CallbackCoderImpl_encoder, __pyx_k_CallbackCoderImpl_encoder, sizeof(__pyx_k_CallbackCoderImpl_encoder), 0, 1, 0, 0},
  {&__pyx_n_s_CallbackCoderImpl_estimate_size, __pyx_k_CallbackCoderImpl_estimate_size, sizeof(__pyx_k_CallbackCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_CallbackCoderImpl_get_estimated, __pyx_k_CallbackCoderImpl_get_estimated, sizeof(__pyx_k_CallbackCoderImpl_get_estimated), 0, 0, 1, 1},
  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
  {&__pyx_kp_u_Cannot_read_state_written_iterab, __pyx_k_Cannot_read_state_written_iterab, sizeof(__pyx_k_Cannot_read_state_written_iterab), 0, 1, 0, 0},
  {&__pyx_n_s_CoderImpl, __pyx_k_CoderImpl, sizeof(__pyx_k_CoderImpl), 0, 0, 1, 1},
  {&__pyx_n_u_CoderImpl, __pyx_k_CoderImpl, sizeof(__pyx_k_CoderImpl), 0, 1, 0, 1},
  {&__pyx_n_s_CoderImpl___reduce_cython, __pyx_k_CoderImpl___reduce_cython, sizeof(__pyx_k_CoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl___setstate_cython, __pyx_k_CoderImpl___setstate_cython, sizeof(__pyx_k_CoderImpl___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl__get_nested_size, __pyx_k_CoderImpl__get_nested_size, sizeof(__pyx_k_CoderImpl__get_nested_size), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_decode, __pyx_k_CoderImpl_decode, sizeof(__pyx_k_CoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_decode_all, __pyx_k_CoderImpl_decode_all, sizeof(__pyx_k_CoderImpl_decode_all), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_decode_from_stream, __pyx_k_CoderImpl_decode_from_stream, sizeof(__pyx_k_CoderImpl_decode_from_stream), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_decode_nested, __pyx_k_CoderImpl_decode_nested, sizeof(__pyx_k_CoderImpl_decode_nested), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_encode, __pyx_k_CoderImpl_encode, sizeof(__pyx_k_CoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_encode_all, __pyx_k_CoderImpl_encode_all, sizeof(__pyx_k_CoderImpl_encode_all), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_encode_nested, __pyx_k_CoderImpl_encode_nested, sizeof(__pyx_k_CoderImpl_encode_nested), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_encode_to_stream, __pyx_k_CoderImpl_encode_to_stream, sizeof(__pyx_k_CoderImpl_encode_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_estimate_size, __pyx_k_CoderImpl_estimate_size, sizeof(__pyx_k_CoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_CoderImpl_get_estimated_size_and, __pyx_k_CoderImpl_get_estimated_size_and, sizeof(__pyx_k_CoderImpl_get_estimated_size_and), 0, 0, 1, 1},
  {&__pyx_n_s_ConcatSequence, __pyx_k_ConcatSequence, sizeof(__pyx_k_ConcatSequence), 0, 0, 1, 1},
  {&__pyx_n_s_ConcatSequence___eq, __pyx_k_ConcatSequence___eq, sizeof(__pyx_k_ConcatSequence___eq), 0, 0, 1, 1},
  {&__pyx_n_s_ConcatSequence___hash, __pyx_k_ConcatSequence___hash, sizeof(__pyx_k_ConcatSequence___hash), 0, 0, 1, 1},
  {&__pyx_n_s_ConcatSequence___init, __pyx_k_ConcatSequence___init, sizeof(__pyx_k_ConcatSequence___init), 0, 0, 1, 1},
  {&__pyx_n_s_ConcatSequence___iter, __pyx_k_ConcatSequence___iter, sizeof(__pyx_k_ConcatSequence___iter), 0, 0, 1, 1},
  {&__pyx_n_s_ConcatSequence___reduce, __pyx_k_ConcatSequence___reduce, sizeof(__pyx_k_ConcatSequence___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_DATACLASS_TYPE, __pyx_k_DATACLASS_TYPE, sizeof(__pyx_k_DATACLASS_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_DEFAULT_BUFFER_SIZE, __pyx_k_DEFAULT_BUFFER_SIZE, sizeof(__pyx_k_DEFAULT_BUFFER_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_DICT_TYPE, __pyx_k_DICT_TYPE, sizeof(__pyx_k_DICT_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_Decimal, __pyx_k_Decimal, sizeof(__pyx_k_Decimal), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalCoderImpl, __pyx_k_DecimalCoderImpl, sizeof(__pyx_k_DecimalCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalCoderImpl___reduce_cython, __pyx_k_DecimalCoderImpl___reduce_cython, sizeof(__pyx_k_DecimalCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalCoderImpl___setstate_cyth, __pyx_k_DecimalCoderImpl___setstate_cyth, sizeof(__pyx_k_DecimalCoderImpl___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalCoderImpl_decode_from_str, __pyx_k_DecimalCoderImpl_decode_from_str, sizeof(__pyx_k_DecimalCoderImpl_decode_from_str), 0, 0, 1, 1},
  {&__pyx_n_s_DecimalCoderImpl_encode_to_strea, __pyx_k_DecimalCoderImpl_encode_to_strea, sizeof(__pyx_k_DecimalCoderImpl_encode_to_strea), 0, 0, 1, 1},
  {&__pyx_n_s_DeterministicProtoCoderImpl, __pyx_k_DeterministicProtoCoderImpl, sizeof(__pyx_k_DeterministicProtoCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_DeterministicProtoCoderImpl_enco, __pyx_k_DeterministicProtoCoderImpl_enco, sizeof(__pyx_k_DeterministicProtoCoderImpl_enco), 0, 0, 1, 1},
  {&__pyx_n_s_Dict, __pyx_k_Dict, sizeof(__pyx_k_Dict), 0, 0, 1, 1},
  {&__pyx_n_s_EARLY, __pyx_k_EARLY, sizeof(__pyx_k_EARLY), 0, 0, 1, 1},
  {&__pyx_n_s_ENCODE_NULL, __pyx_k_ENCODE_NULL, sizeof(__pyx_k_ENCODE_NULL), 0, 0, 1, 1},
  {&__pyx_n_s_ENCODE_PRESENT, __pyx_k_ENCODE_PRESENT, sizeof(__pyx_k_ENCODE_PRESENT), 0, 0, 1, 1},
  {&__pyx_n_s_ENUM_TYPE, __pyx_k_ENUM_TYPE, sizeof(__pyx_k_ENUM_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
  {&__pyx_kp_u_Encountered_unexpected_value_for, __pyx_k_Encountered_unexpected_value_for, sizeof(__pyx_k_Encountered_unexpected_value_for), 0, 1, 0, 0},
  {&__pyx_n_s_Enum, __pyx_k_Enum, sizeof(__pyx_k_Enum), 0, 0, 1, 1},
  {&__pyx_kp_u_Expected_0_or_1_got_s, __pyx_k_Expected_0_or_1_got_s, sizeof(__pyx_k_Expected_0_or_1_got_s), 0, 1, 0, 0},
  {&__pyx_n_s_FIRST, __pyx_k_FIRST, sizeof(__pyx_k_FIRST), 0, 0, 1, 1},
  {&__pyx_n_s_FLOAT_TYPE, __pyx_k_FLOAT_TYPE, sizeof(__pyx_k_FLOAT_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_FastPrimitivesCoderImpl, __pyx_k_FastPrimitivesCoderImpl, sizeof(__pyx_k_FastPrimitivesCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_FastPrimitivesCoderImpl___reduce, __pyx_k_FastPrimitivesCoderImpl___reduce, sizeof(__pyx_k_FastPrimitivesCoderImpl___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_FastPrimitivesCoderImpl___setsta, __pyx_k_FastPrimitivesCoderImpl___setsta, sizeof(__pyx_k_FastPrimitivesCoderImpl___setsta), 0, 0, 1, 1},
  {&__pyx_n_s_FastPrimitivesCoderImpl__determi, __pyx_k_FastPrimitivesCoderImpl__determi, sizeof(__pyx_k_FastPrimitivesCoderImpl__determi), 0, 0, 1, 1},
  {&__pyx_n_s_FastPrimitivesCoderImpl_decode_f, __pyx_k_FastPrimitivesCoderImpl_decode_f, sizeof(__pyx_k_FastPrimitivesCoderImpl_decode_f), 0, 0, 1, 1},
  {&__pyx_n_s_FastPrimitivesCoderImpl_encode_t, __pyx_k_FastPrimitivesCoderImpl_encode_t, sizeof(__pyx_k_FastPrimitivesCoderImpl_encode_t), 0, 0, 1, 1},
  {&__pyx_n_s_FastPrimitivesCoderImpl_get_esti, __pyx_k_FastPrimitivesCoderImpl_get_esti, sizeof(__pyx_k_FastPrimitivesCoderImpl_get_esti), 0, 0, 1, 1},
  {&__pyx_n_s_FastPrimitivesCoderImpl_register, __pyx_k_FastPrimitivesCoderImpl_register, sizeof(__pyx_k_FastPrimitivesCoderImpl_register), 0, 0, 1, 1},
  {&__pyx_n_s_FloatCoderImpl, __pyx_k_FloatCoderImpl, sizeof(__pyx_k_FloatCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_FloatCoderImpl___reduce_cython, __pyx_k_FloatCoderImpl___reduce_cython, sizeof(__pyx_k_FloatCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_FloatCoderImpl___setstate_cython, __pyx_k_FloatCoderImpl___setstate_cython, sizeof(__pyx_k_FloatCoderImpl___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_FloatCoderImpl_decode_from_strea, __pyx_k_FloatCoderImpl_decode_from_strea, sizeof(__pyx_k_FloatCoderImpl_decode_from_strea), 0, 0, 1, 1},
  {&__pyx_n_s_FloatCoderImpl_encode_to_stream, __pyx_k_FloatCoderImpl_encode_to_stream, sizeof(__pyx_k_FloatCoderImpl_encode_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_FloatCoderImpl_estimate_size, __pyx_k_FloatCoderImpl_estimate_size, sizeof(__pyx_k_FloatCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_kp_s_For_internal_use_only_no_backwar, __pyx_k_For_internal_use_only_no_backwar, sizeof(__pyx_k_For_internal_use_only_no_backwar), 0, 0, 1, 0},
  {&__pyx_kp_s_For_internal_use_only_no_backwar_2, __pyx_k_For_internal_use_only_no_backwar_2, sizeof(__pyx_k_For_internal_use_only_no_backwar_2), 0, 0, 1, 0},
  {&__pyx_kp_s_For_internal_use_only_no_backwar_3, __pyx_k_For_internal_use_only_no_backwar_3, sizeof(__pyx_k_For_internal_use_only_no_backwar_3), 0, 0, 1, 0},
  {&__pyx_kp_s_For_internal_use_only_no_backwar_4, __pyx_k_For_internal_use_only_no_backwar_4, sizeof(__pyx_k_For_internal_use_only_no_backwar_4), 0, 0, 1, 0},
  {&__pyx_kp_s_For_internal_use_only_no_backwar_5, __pyx_k_For_internal_use_only_no_backwar_5, sizeof(__pyx_k_For_internal_use_only_no_backwar_5), 0, 0, 1, 0},
  {&__pyx_n_s_GenericRowColumnEncoder, __pyx_k_GenericRowColumnEncoder, sizeof(__pyx_k_GenericRowColumnEncoder), 0, 0, 1, 1},
  {&__pyx_n_s_GenericRowColumnEncoder___reduce, __pyx_k_GenericRowColumnEncoder___reduce, sizeof(__pyx_k_GenericRowColumnEncoder___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_GenericRowColumnEncoder___setsta, __pyx_k_GenericRowColumnEncoder___setsta, sizeof(__pyx_k_GenericRowColumnEncoder___setsta), 0, 0, 1, 1},
  {&__pyx_n_s_GenericRowColumnEncoder_finalize, __pyx_k_GenericRowColumnEncoder_finalize, sizeof(__pyx_k_GenericRowColumnEncoder_finalize), 0, 0, 1, 1},
  {&__pyx_n_s_GenericRowColumnEncoder_null_fla, __pyx_k_GenericRowColumnEncoder_null_fla, sizeof(__pyx_k_GenericRowColumnEncoder_null_fla), 0, 0, 1, 1},
  {&__pyx_n_s_INT_TYPE, __pyx_k_INT_TYPE, sizeof(__pyx_k_INT_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_ITERABLE_LIKE_TYPE, __pyx_k_ITERABLE_LIKE_TYPE, sizeof(__pyx_k_ITERABLE_LIKE_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_ITERABLE_LIKE_TYPES, __pyx_k_ITERABLE_LIKE_TYPES, sizeof(__pyx_k_ITERABLE_LIKE_TYPES), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_10, __pyx_k_Incompatible_checksums_0x_x_vs_0_10, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_10), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_11, __pyx_k_Incompatible_checksums_0x_x_vs_0_11, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_11), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_12, __pyx_k_Incompatible_checksums_0x_x_vs_0_12, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_12), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_13, __pyx_k_Incompatible_checksums_0x_x_vs_0_13, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_13), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_14, __pyx_k_Incompatible_checksums_0x_x_vs_0_14, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_14), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_15, __pyx_k_Incompatible_checksums_0x_x_vs_0_15, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_15), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_16, __pyx_k_Incompatible_checksums_0x_x_vs_0_16, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_16), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_17, __pyx_k_Incompatible_checksums_0x_x_vs_0_17, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_17), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_2, __pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_3, __pyx_k_Incompatible_checksums_0x_x_vs_0_3, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_3), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_4, __pyx_k_Incompatible_checksums_0x_x_vs_0_4, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_4), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_5, __pyx_k_Incompatible_checksums_0x_x_vs_0_5, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_5), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_6, __pyx_k_Incompatible_checksums_0x_x_vs_0_6, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_6), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_7, __pyx_k_Incompatible_checksums_0x_x_vs_0_7, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_7), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_8, __pyx_k_Incompatible_checksums_0x_x_vs_0_8, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_8), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0_9, __pyx_k_Incompatible_checksums_0x_x_vs_0_9, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_9), 0, 0, 1, 0},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
  {&__pyx_n_s_InputStream, __pyx_k_InputStream, sizeof(__pyx_k_InputStream), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalWindow, __pyx_k_IntervalWindow, sizeof(__pyx_k_IntervalWindow), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalWindowCoderImpl, __pyx_k_IntervalWindowCoderImpl, sizeof(__pyx_k_IntervalWindowCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalWindowCoderImpl___reduce, __pyx_k_IntervalWindowCoderImpl___reduce, sizeof(__pyx_k_IntervalWindowCoderImpl___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalWindowCoderImpl___setsta, __pyx_k_IntervalWindowCoderImpl___setsta, sizeof(__pyx_k_IntervalWindowCoderImpl___setsta), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalWindowCoderImpl_decode_f, __pyx_k_IntervalWindowCoderImpl_decode_f, sizeof(__pyx_k_IntervalWindowCoderImpl_decode_f), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalWindowCoderImpl_encode_t, __pyx_k_IntervalWindowCoderImpl_encode_t, sizeof(__pyx_k_IntervalWindowCoderImpl_encode_t), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalWindowCoderImpl_estimate, __pyx_k_IntervalWindowCoderImpl_estimate, sizeof(__pyx_k_IntervalWindowCoderImpl_estimate), 0, 0, 1, 1},
  {&__pyx_kp_u_Invalid_PaneInfoEncoding_s, __pyx_k_Invalid_PaneInfoEncoding_s, sizeof(__pyx_k_Invalid_PaneInfoEncoding_s), 0, 1, 0, 0},
  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
  {&__pyx_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1},
  {&__pyx_n_s_IterableCoderImpl, __pyx_k_IterableCoderImpl, sizeof(__pyx_k_IterableCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_IterableCoderImpl___reduce_cytho, __pyx_k_IterableCoderImpl___reduce_cytho, sizeof(__pyx_k_IterableCoderImpl___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_IterableCoderImpl___setstate_cyt, __pyx_k_IterableCoderImpl___setstate_cyt, sizeof(__pyx_k_IterableCoderImpl___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_IterableCoderImpl__construct_fro, __pyx_k_IterableCoderImpl__construct_fro, sizeof(__pyx_k_IterableCoderImpl__construct_fro), 0, 0, 1, 1},
  {&__pyx_n_s_IterableStateReader, __pyx_k_IterableStateReader, sizeof(__pyx_k_IterableStateReader), 0, 0, 1, 1},
  {&__pyx_n_s_IterableStateWriter, __pyx_k_IterableStateWriter, sizeof(__pyx_k_IterableStateWriter), 0, 0, 1, 1},
  {&__pyx_n_s_Iterator, __pyx_k_Iterator, sizeof(__pyx_k_Iterator), 0, 0, 1, 1},
  {&__pyx_n_s_LIST_TYPE, __pyx_k_LIST_TYPE, sizeof(__pyx_k_LIST_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_LOGGER, __pyx_k_LOGGER, sizeof(__pyx_k_LOGGER), 0, 0, 1, 1},
  {&__pyx_n_s_LengthPrefixCoderImpl, __pyx_k_LengthPrefixCoderImpl, sizeof(__pyx_k_LengthPrefixCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_LengthPrefixCoderImpl___reduce_c, __pyx_k_LengthPrefixCoderImpl___reduce_c, sizeof(__pyx_k_LengthPrefixCoderImpl___reduce_c), 0, 0, 1, 1},
  {&__pyx_n_s_LengthPrefixCoderImpl___setstate, __pyx_k_LengthPrefixCoderImpl___setstate, sizeof(__pyx_k_LengthPrefixCoderImpl___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_LengthPrefixCoderImpl_decode_fro, __pyx_k_LengthPrefixCoderImpl_decode_fro, sizeof(__pyx_k_LengthPrefixCoderImpl_decode_fro), 0, 0, 1, 1},
  {&__pyx_n_s_LengthPrefixCoderImpl_encode_to, __pyx_k_LengthPrefixCoderImpl_encode_to, sizeof(__pyx_k_LengthPrefixCoderImpl_encode_to), 0, 0, 1, 1},
  {&__pyx_n_s_LengthPrefixCoderImpl_estimate_s, __pyx_k_LengthPrefixCoderImpl_estimate_s, sizeof(__pyx_k_LengthPrefixCoderImpl_estimate_s), 0, 0, 1, 1},
  {&__pyx_n_s_List, __pyx_k_List, sizeof(__pyx_k_List), 0, 0, 1, 1},
  {&__pyx_n_s_ListCoderImpl, __pyx_k_ListCoderImpl, sizeof(__pyx_k_ListCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_ListCoderImpl___reduce_cython, __pyx_k_ListCoderImpl___reduce_cython, sizeof(__pyx_k_ListCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_ListCoderImpl___setstate_cython, __pyx_k_ListCoderImpl___setstate_cython, sizeof(__pyx_k_ListCoderImpl___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_ListCoderImpl__construct_from_se, __pyx_k_ListCoderImpl__construct_from_se, sizeof(__pyx_k_ListCoderImpl__construct_from_se), 0, 0, 1, 1},
  {&__pyx_n_s_LogicalTypeCoderImpl, __pyx_k_LogicalTypeCoderImpl, sizeof(__pyx_k_LogicalTypeCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_LogicalTypeCoderImpl___reduce_cy, __pyx_k_LogicalTypeCoderImpl___reduce_cy, sizeof(__pyx_k_LogicalTypeCoderImpl___reduce_cy), 0, 0, 1, 1},
  {&__pyx_n_s_LogicalTypeCoderImpl___setstate, __pyx_k_LogicalTypeCoderImpl___setstate, sizeof(__pyx_k_LogicalTypeCoderImpl___setstate), 0, 0, 1, 1},
  {&__pyx_n_s_LogicalTypeCoderImpl_decode_from, __pyx_k_LogicalTypeCoderImpl_decode_from, sizeof(__pyx_k_LogicalTypeCoderImpl_decode_from), 0, 0, 1, 1},
  {&__pyx_n_s_LogicalTypeCoderImpl_encode_to_s, __pyx_k_LogicalTypeCoderImpl_encode_to_s, sizeof(__pyx_k_LogicalTypeCoderImpl_encode_to_s), 0, 0, 1, 1},
  {&__pyx_n_s_MAX_TIMESTAMP, __pyx_k_MAX_TIMESTAMP, sizeof(__pyx_k_MAX_TIMESTAMP), 0, 0, 1, 1},
  {&__pyx_n_s_MAX_TIMESTAMP_micros, __pyx_k_MAX_TIMESTAMP_micros, sizeof(__pyx_k_MAX_TIMESTAMP_micros), 0, 0, 1, 1},
  {&__pyx_n_s_MIN_TIMESTAMP, __pyx_k_MIN_TIMESTAMP, sizeof(__pyx_k_MIN_TIMESTAMP), 0, 0, 1, 1},
  {&__pyx_n_s_MIN_TIMESTAMP_micros, __pyx_k_MIN_TIMESTAMP_micros, sizeof(__pyx_k_MIN_TIMESTAMP_micros), 0, 0, 1, 1},
  {&__pyx_n_s_MapCoderImpl, __pyx_k_MapCoderImpl, sizeof(__pyx_k_MapCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_MapCoderImpl___reduce_cython, __pyx_k_MapCoderImpl___reduce_cython, sizeof(__pyx_k_MapCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_MapCoderImpl___setstate_cython, __pyx_k_MapCoderImpl___setstate_cython, sizeof(__pyx_k_MapCoderImpl___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_MapCoderImpl_decode_from_stream, __pyx_k_MapCoderImpl_decode_from_stream, sizeof(__pyx_k_MapCoderImpl_decode_from_stream), 0, 0, 1, 1},
  {&__pyx_n_s_MapCoderImpl_encode_to_stream, __pyx_k_MapCoderImpl_encode_to_stream, sizeof(__pyx_k_MapCoderImpl_encode_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_MapCoderImpl_estimate_size, __pyx_k_MapCoderImpl_estimate_size, sizeof(__pyx_k_MapCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
  {&__pyx_n_s_NAMED_TUPLE_TYPE, __pyx_k_NAMED_TUPLE_TYPE, sizeof(__pyx_k_NAMED_TUPLE_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_NESTED_STATE_TYPE, __pyx_k_NESTED_STATE_TYPE, sizeof(__pyx_k_NESTED_STATE_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_NONE_TYPE, __pyx_k_NONE_TYPE, sizeof(__pyx_k_NONE_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_NoneType, __pyx_k_NoneType, sizeof(__pyx_k_NoneType), 0, 0, 1, 1},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_s_NullableCoderImpl, __pyx_k_NullableCoderImpl, sizeof(__pyx_k_NullableCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_NullableCoderImpl___init, __pyx_k_NullableCoderImpl___init, sizeof(__pyx_k_NullableCoderImpl___init), 0, 0, 1, 1},
  {&__pyx_n_s_NullableCoderImpl_decode_from_st, __pyx_k_NullableCoderImpl_decode_from_st, sizeof(__pyx_k_NullableCoderImpl_decode_from_st), 0, 0, 1, 1},
  {&__pyx_n_s_NullableCoderImpl_encode_to_stre, __pyx_k_NullableCoderImpl_encode_to_stre, sizeof(__pyx_k_NullableCoderImpl_encode_to_stre), 0, 0, 1, 1},
  {&__pyx_n_s_NullableCoderImpl_estimate_size, __pyx_k_NullableCoderImpl_estimate_size, sizeof(__pyx_k_NullableCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_kp_u_Number_of_components_does_not_ma, __pyx_k_Number_of_components_does_not_ma, sizeof(__pyx_k_Number_of_components_does_not_ma), 0, 1, 0, 0},
  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
  {&__pyx_n_s_ONE_INDEX, __pyx_k_ONE_INDEX, sizeof(__pyx_k_ONE_INDEX), 0, 0, 1, 1},
  {&__pyx_n_s_ObservableMixin, __pyx_k_ObservableMixin, sizeof(__pyx_k_ObservableMixin), 0, 0, 1, 1},
  {&__pyx_n_s_Observables, __pyx_k_Observables, sizeof(__pyx_k_Observables), 0, 0, 1, 1},
  {&__pyx_n_s_Optional, __pyx_k_Optional, sizeof(__pyx_k_Optional), 0, 0, 1, 1},
  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
  {&__pyx_n_s_OutputStream, __pyx_k_OutputStream, sizeof(__pyx_k_OutputStream), 0, 0, 1, 1},
  {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1},
  {&__pyx_n_s_PROTO_TYPE, __pyx_k_PROTO_TYPE, sizeof(__pyx_k_PROTO_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoCoderImpl, __pyx_k_PaneInfoCoderImpl, sizeof(__pyx_k_PaneInfoCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoCoderImpl___reduce_cytho, __pyx_k_PaneInfoCoderImpl___reduce_cytho, sizeof(__pyx_k_PaneInfoCoderImpl___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoCoderImpl___setstate_cyt, __pyx_k_PaneInfoCoderImpl___setstate_cyt, sizeof(__pyx_k_PaneInfoCoderImpl___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoCoderImpl_decode_from_st, __pyx_k_PaneInfoCoderImpl_decode_from_st, sizeof(__pyx_k_PaneInfoCoderImpl_decode_from_st), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoCoderImpl_encode_to_stre, __pyx_k_PaneInfoCoderImpl_encode_to_stre, sizeof(__pyx_k_PaneInfoCoderImpl_encode_to_stre), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoCoderImpl_estimate_size, __pyx_k_PaneInfoCoderImpl_estimate_size, sizeof(__pyx_k_PaneInfoCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoEncoding, __pyx_k_PaneInfoEncoding, sizeof(__pyx_k_PaneInfoEncoding), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoEncoding_FIRST, __pyx_k_PaneInfoEncoding_FIRST, sizeof(__pyx_k_PaneInfoEncoding_FIRST), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoTiming, __pyx_k_PaneInfoTiming, sizeof(__pyx_k_PaneInfoTiming), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfoTiming_UNKNOWN, __pyx_k_PaneInfoTiming_UNKNOWN, sizeof(__pyx_k_PaneInfoTiming_UNKNOWN), 0, 0, 1, 1},
  {&__pyx_n_s_ParamWindowedValueCoderImpl, __pyx_k_ParamWindowedValueCoderImpl, sizeof(__pyx_k_ParamWindowedValueCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_ParamWindowedValueCoderImpl___re, __pyx_k_ParamWindowedValueCoderImpl___re, sizeof(__pyx_k_ParamWindowedValueCoderImpl___re), 0, 0, 1, 1},
  {&__pyx_n_s_ParamWindowedValueCoderImpl___se, __pyx_k_ParamWindowedValueCoderImpl___se, sizeof(__pyx_k_ParamWindowedValueCoderImpl___se), 0, 0, 1, 1},
  {&__pyx_n_s_ParamWindowedValueCoderImpl__fro, __pyx_k_ParamWindowedValueCoderImpl__fro, sizeof(__pyx_k_ParamWindowedValueCoderImpl__fro), 0, 0, 1, 1},
  {&__pyx_n_s_ParamWindowedValueCoderImpl_deco, __pyx_k_ParamWindowedValueCoderImpl_deco, sizeof(__pyx_k_ParamWindowedValueCoderImpl_deco), 0, 0, 1, 1},
  {&__pyx_n_s_ParamWindowedValueCoderImpl_enco, __pyx_k_ParamWindowedValueCoderImpl_enco, sizeof(__pyx_k_ParamWindowedValueCoderImpl_enco), 0, 0, 1, 1},
  {&__pyx_n_s_ParamWindowedValueCoderImpl_get, __pyx_k_ParamWindowedValueCoderImpl_get, sizeof(__pyx_k_ParamWindowedValueCoderImpl_get), 0, 0, 1, 1},
  {&__pyx_n_s_ParseFromString, __pyx_k_ParseFromString, sizeof(__pyx_k_ParseFromString), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_PicklingError, __pyx_k_PicklingError, sizeof(__pyx_k_PicklingError), 0, 0, 1, 1},
  {&__pyx_n_s_ProtoCoderImpl, __pyx_k_ProtoCoderImpl, sizeof(__pyx_k_ProtoCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_ProtoCoderImpl___init, __pyx_k_ProtoCoderImpl___init, sizeof(__pyx_k_ProtoCoderImpl___init), 0, 0, 1, 1},
  {&__pyx_n_s_ProtoCoderImpl_decode, __pyx_k_ProtoCoderImpl_decode, sizeof(__pyx_k_ProtoCoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_ProtoCoderImpl_encode, __pyx_k_ProtoCoderImpl_encode, sizeof(__pyx_k_ProtoCoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_ProtoPlusCoderImpl, __pyx_k_ProtoPlusCoderImpl, sizeof(__pyx_k_ProtoPlusCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_ProtoPlusCoderImpl___init, __pyx_k_ProtoPlusCoderImpl___init, sizeof(__pyx_k_ProtoPlusCoderImpl___init), 0, 0, 1, 1},
  {&__pyx_n_s_ProtoPlusCoderImpl_decode, __pyx_k_ProtoPlusCoderImpl_decode, sizeof(__pyx_k_ProtoPlusCoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_ProtoPlusCoderImpl_encode, __pyx_k_ProtoPlusCoderImpl_encode, sizeof(__pyx_k_ProtoPlusCoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_ROW_ENCODERS, __pyx_k_ROW_ENCODERS, sizeof(__pyx_k_ROW_ENCODERS), 0, 0, 1, 1},
  {&__pyx_n_s_RowCoderImpl, __pyx_k_RowCoderImpl, sizeof(__pyx_k_RowCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_RowCoderImpl___reduce_cython, __pyx_k_RowCoderImpl___reduce_cython, sizeof(__pyx_k_RowCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_RowCoderImpl___setstate_cython, __pyx_k_RowCoderImpl___setstate_cython, sizeof(__pyx_k_RowCoderImpl___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_RowCoderImpl__row_column_encoder, __pyx_k_RowCoderImpl__row_column_encoder, sizeof(__pyx_k_RowCoderImpl__row_column_encoder), 0, 0, 1, 1},
  {&__pyx_n_s_RowCoderImpl_decode_batch_from_s, __pyx_k_RowCoderImpl_decode_batch_from_s, sizeof(__pyx_k_RowCoderImpl_decode_batch_from_s), 0, 0, 1, 1},
  {&__pyx_n_s_RowCoderImpl_decode_from_stream, __pyx_k_RowCoderImpl_decode_from_stream, sizeof(__pyx_k_RowCoderImpl_decode_from_stream), 0, 0, 1, 1},
  {&__pyx_n_s_RowCoderImpl_encode_batch_to_str, __pyx_k_RowCoderImpl_encode_batch_to_str, sizeof(__pyx_k_RowCoderImpl_encode_batch_to_str), 0, 0, 1, 1},
  {&__pyx_n_s_RowCoderImpl_encode_to_stream, __pyx_k_RowCoderImpl_encode_to_stream, sizeof(__pyx_k_RowCoderImpl_encode_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_RowColumnEncoder, __pyx_k_RowColumnEncoder, sizeof(__pyx_k_RowColumnEncoder), 0, 0, 1, 1},
  {&__pyx_n_s_RowColumnEncoder___reduce_cython, __pyx_k_RowColumnEncoder___reduce_cython, sizeof(__pyx_k_RowColumnEncoder___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_RowColumnEncoder___setstate_cyth, __pyx_k_RowColumnEncoder___setstate_cyth, sizeof(__pyx_k_RowColumnEncoder___setstate_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_RowColumnEncoder_create, __pyx_k_RowColumnEncoder_create, sizeof(__pyx_k_RowColumnEncoder_create), 0, 0, 1, 1},
  {&__pyx_n_s_RowColumnEncoder_finalize_write, __pyx_k_RowColumnEncoder_finalize_write, sizeof(__pyx_k_RowColumnEncoder_finalize_write), 0, 0, 1, 1},
  {&__pyx_n_s_RowColumnEncoder_null_flags, __pyx_k_RowColumnEncoder_null_flags, sizeof(__pyx_k_RowColumnEncoder_null_flags), 0, 0, 1, 1},
  {&__pyx_n_s_RowColumnEncoder_register, __pyx_k_RowColumnEncoder_register, sizeof(__pyx_k_RowColumnEncoder_register), 0, 0, 1, 1},
  {&__pyx_n_s_SET_TYPE, __pyx_k_SET_TYPE, sizeof(__pyx_k_SET_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_SLOW_STREAM, __pyx_k_SLOW_STREAM, sizeof(__pyx_k_SLOW_STREAM), 0, 0, 1, 1},
  {&__pyx_kp_u_Schema_with_id, __pyx_k_Schema_with_id, sizeof(__pyx_k_Schema_with_id), 0, 1, 0, 0},
  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
  {&__pyx_n_s_SequenceCoderImpl, __pyx_k_SequenceCoderImpl, sizeof(__pyx_k_SequenceCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_SequenceCoderImpl___reduce_cytho, __pyx_k_SequenceCoderImpl___reduce_cytho, sizeof(__pyx_k_SequenceCoderImpl___reduce_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_SequenceCoderImpl___setstate_cyt, __pyx_k_SequenceCoderImpl___setstate_cyt, sizeof(__pyx_k_SequenceCoderImpl___setstate_cyt), 0, 0, 1, 1},
  {&__pyx_n_s_SequenceCoderImpl__construct_fro, __pyx_k_SequenceCoderImpl__construct_fro, sizeof(__pyx_k_SequenceCoderImpl__construct_fro), 0, 0, 1, 1},
  {&__pyx_n_s_SequenceCoderImpl_decode_from_st, __pyx_k_SequenceCoderImpl_decode_from_st, sizeof(__pyx_k_SequenceCoderImpl_decode_from_st), 0, 0, 1, 1},
  {&__pyx_n_s_SequenceCoderImpl_encode_to_stre, __pyx_k_SequenceCoderImpl_encode_to_stre, sizeof(__pyx_k_SequenceCoderImpl_encode_to_stre), 0, 0, 1, 1},
  {&__pyx_n_s_SequenceCoderImpl_estimate_size, __pyx_k_SequenceCoderImpl_estimate_size, sizeof(__pyx_k_SequenceCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_SequenceCoderImpl_get_estimated, __pyx_k_SequenceCoderImpl_get_estimated, sizeof(__pyx_k_SequenceCoderImpl_get_estimated), 0, 0, 1, 1},
  {&__pyx_n_s_SerializePartialToString, __pyx_k_SerializePartialToString, sizeof(__pyx_k_SerializePartialToString), 0, 0, 1, 1},
  {&__pyx_n_s_Set, __pyx_k_Set, sizeof(__pyx_k_Set), 0, 0, 1, 1},
  {&__pyx_n_s_ShardedKey, __pyx_k_ShardedKey, sizeof(__pyx_k_ShardedKey), 0, 0, 1, 1},
  {&__pyx_n_s_ShardedKeyCoderImpl, __pyx_k_ShardedKeyCoderImpl, sizeof(__pyx_k_ShardedKeyCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_ShardedKeyCoderImpl___init, __pyx_k_ShardedKeyCoderImpl___init, sizeof(__pyx_k_ShardedKeyCoderImpl___init), 0, 0, 1, 1},
  {&__pyx_n_s_ShardedKeyCoderImpl_decode_from, __pyx_k_ShardedKeyCoderImpl_decode_from, sizeof(__pyx_k_ShardedKeyCoderImpl_decode_from), 0, 0, 1, 1},
  {&__pyx_n_s_ShardedKeyCoderImpl_encode_to_st, __pyx_k_ShardedKeyCoderImpl_encode_to_st, sizeof(__pyx_k_ShardedKeyCoderImpl_encode_to_st), 0, 0, 1, 1},
  {&__pyx_n_s_ShardedKeyCoderImpl_estimate_siz, __pyx_k_ShardedKeyCoderImpl_estimate_siz, sizeof(__pyx_k_ShardedKeyCoderImpl_estimate_siz), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleCoderImpl, __pyx_k_SimpleCoderImpl, sizeof(__pyx_k_SimpleCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleCoderImpl___reduce_cython, __pyx_k_SimpleCoderImpl___reduce_cython, sizeof(__pyx_k_SimpleCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleCoderImpl___setstate_cytho, __pyx_k_SimpleCoderImpl___setstate_cytho, sizeof(__pyx_k_SimpleCoderImpl___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleCoderImpl_decode_from_stre, __pyx_k_SimpleCoderImpl_decode_from_stre, sizeof(__pyx_k_SimpleCoderImpl_decode_from_stre), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleCoderImpl_encode_to_stream, __pyx_k_SimpleCoderImpl_encode_to_stream, sizeof(__pyx_k_SimpleCoderImpl_encode_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_SinglePrecisionFloatCoderImpl, __pyx_k_SinglePrecisionFloatCoderImpl, sizeof(__pyx_k_SinglePrecisionFloatCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_SinglePrecisionFloatCoderImpl_2, __pyx_k_SinglePrecisionFloatCoderImpl_2, sizeof(__pyx_k_SinglePrecisionFloatCoderImpl_2), 0, 0, 1, 1},
  {&__pyx_n_s_SinglePrecisionFloatCoderImpl_3, __pyx_k_SinglePrecisionFloatCoderImpl_3, sizeof(__pyx_k_SinglePrecisionFloatCoderImpl_3), 0, 0, 1, 1},
  {&__pyx_n_s_SinglePrecisionFloatCoderImpl_de, __pyx_k_SinglePrecisionFloatCoderImpl_de, sizeof(__pyx_k_SinglePrecisionFloatCoderImpl_de), 0, 0, 1, 1},
  {&__pyx_n_s_SinglePrecisionFloatCoderImpl_en, __pyx_k_SinglePrecisionFloatCoderImpl_en, sizeof(__pyx_k_SinglePrecisionFloatCoderImpl_en), 0, 0, 1, 1},
  {&__pyx_n_s_SinglePrecisionFloatCoderImpl_es, __pyx_k_SinglePrecisionFloatCoderImpl_es, sizeof(__pyx_k_SinglePrecisionFloatCoderImpl_es), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonCoderImpl, __pyx_k_SingletonCoderImpl, sizeof(__pyx_k_SingletonCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonCoderImpl___reduce_cyth, __pyx_k_SingletonCoderImpl___reduce_cyth, sizeof(__pyx_k_SingletonCoderImpl___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonCoderImpl___setstate_cy, __pyx_k_SingletonCoderImpl___setstate_cy, sizeof(__pyx_k_SingletonCoderImpl___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonCoderImpl_decode, __pyx_k_SingletonCoderImpl_decode, sizeof(__pyx_k_SingletonCoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonCoderImpl_decode_from_s, __pyx_k_SingletonCoderImpl_decode_from_s, sizeof(__pyx_k_SingletonCoderImpl_decode_from_s), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonCoderImpl_encode, __pyx_k_SingletonCoderImpl_encode, sizeof(__pyx_k_SingletonCoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonCoderImpl_encode_to_str, __pyx_k_SingletonCoderImpl_encode_to_str, sizeof(__pyx_k_SingletonCoderImpl_encode_to_str), 0, 0, 1, 1},
  {&__pyx_n_s_SingletonCoderImpl_estimate_size, __pyx_k_SingletonCoderImpl_estimate_size, sizeof(__pyx_k_SingletonCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_StrUtf8Coder, __pyx_k_StrUtf8Coder, sizeof(__pyx_k_StrUtf8Coder), 0, 0, 1, 1},
  {&__pyx_n_s_StreamCoderImpl, __pyx_k_StreamCoderImpl, sizeof(__pyx_k_StreamCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_StreamCoderImpl___reduce_cython, __pyx_k_StreamCoderImpl___reduce_cython, sizeof(__pyx_k_StreamCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_StreamCoderImpl___setstate_cytho, __pyx_k_StreamCoderImpl___setstate_cytho, sizeof(__pyx_k_StreamCoderImpl___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_StreamCoderImpl_decode, __pyx_k_StreamCoderImpl_decode, sizeof(__pyx_k_StreamCoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_StreamCoderImpl_encode, __pyx_k_StreamCoderImpl_encode, sizeof(__pyx_k_StreamCoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_StreamCoderImpl_estimate_size, __pyx_k_StreamCoderImpl_estimate_size, sizeof(__pyx_k_StreamCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_TIME_SHIFT, __pyx_k_TIME_SHIFT, sizeof(__pyx_k_TIME_SHIFT), 0, 0, 1, 1},
  {&__pyx_n_s_TUPLE_TYPE, __pyx_k_TUPLE_TYPE, sizeof(__pyx_k_TUPLE_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_TWO_INDICES, __pyx_k_TWO_INDICES, sizeof(__pyx_k_TWO_INDICES), 0, 0, 1, 1},
  {&__pyx_n_s_TYPE_CHECKING, __pyx_k_TYPE_CHECKING, sizeof(__pyx_k_TYPE_CHECKING), 0, 0, 1, 1},
  {&__pyx_kp_u_The_object_defines___getstate, __pyx_k_The_object_defines___getstate, sizeof(__pyx_k_The_object_defines___getstate), 0, 1, 0, 0},
  {&__pyx_n_s_Timer, __pyx_k_Timer, sizeof(__pyx_k_Timer), 0, 0, 1, 1},
  {&__pyx_n_s_TimerCoderImpl, __pyx_k_TimerCoderImpl, sizeof(__pyx_k_TimerCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_TimerCoderImpl___init, __pyx_k_TimerCoderImpl___init, sizeof(__pyx_k_TimerCoderImpl___init), 0, 0, 1, 1},
  {&__pyx_n_s_TimerCoderImpl_decode_from_strea, __pyx_k_TimerCoderImpl_decode_from_strea, sizeof(__pyx_k_TimerCoderImpl_decode_from_strea), 0, 0, 1, 1},
  {&__pyx_n_s_TimerCoderImpl_encode_to_stream, __pyx_k_TimerCoderImpl_encode_to_stream, sizeof(__pyx_k_TimerCoderImpl_encode_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_Timestamp, __pyx_k_Timestamp, sizeof(__pyx_k_Timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampCoderImpl, __pyx_k_TimestampCoderImpl, sizeof(__pyx_k_TimestampCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampCoderImpl___reduce_cyth, __pyx_k_TimestampCoderImpl___reduce_cyth, sizeof(__pyx_k_TimestampCoderImpl___reduce_cyth), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampCoderImpl___setstate_cy, __pyx_k_TimestampCoderImpl___setstate_cy, sizeof(__pyx_k_TimestampCoderImpl___setstate_cy), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampCoderImpl_decode_from_s, __pyx_k_TimestampCoderImpl_decode_from_s, sizeof(__pyx_k_TimestampCoderImpl_decode_from_s), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampCoderImpl_encode_to_str, __pyx_k_TimestampCoderImpl_encode_to_str, sizeof(__pyx_k_TimestampCoderImpl_encode_to_str), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampCoderImpl_estimate_size, __pyx_k_TimestampCoderImpl_estimate_size, sizeof(__pyx_k_TimestampCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampPrefixingWindowCoderImp, __pyx_k_TimestampPrefixingWindowCoderImp, sizeof(__pyx_k_TimestampPrefixingWindowCoderImp), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampPrefixingWindowCoderImp_2, __pyx_k_TimestampPrefixingWindowCoderImp_2, sizeof(__pyx_k_TimestampPrefixingWindowCoderImp_2), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampPrefixingWindowCoderImp_3, __pyx_k_TimestampPrefixingWindowCoderImp_3, sizeof(__pyx_k_TimestampPrefixingWindowCoderImp_3), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampPrefixingWindowCoderImp_4, __pyx_k_TimestampPrefixingWindowCoderImp_4, sizeof(__pyx_k_TimestampPrefixingWindowCoderImp_4), 0, 0, 1, 1},
  {&__pyx_n_s_TimestampPrefixingWindowCoderImp_5, __pyx_k_TimestampPrefixingWindowCoderImp_5, sizeof(__pyx_k_TimestampPrefixingWindowCoderImp_5), 0, 0, 1, 1},
  {&__pyx_n_s_Tuple, __pyx_k_Tuple, sizeof(__pyx_k_Tuple), 0, 0, 1, 1},
  {&__pyx_n_s_TupleCoderImpl, __pyx_k_TupleCoderImpl, sizeof(__pyx_k_TupleCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_TupleCoderImpl___reduce_cython, __pyx_k_TupleCoderImpl___reduce_cython, sizeof(__pyx_k_TupleCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TupleCoderImpl___setstate_cython, __pyx_k_TupleCoderImpl___setstate_cython, sizeof(__pyx_k_TupleCoderImpl___setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_TupleCoderImpl__construct_from_c, __pyx_k_TupleCoderImpl__construct_from_c, sizeof(__pyx_k_TupleCoderImpl__construct_from_c), 0, 0, 1, 1},
  {&__pyx_n_s_TupleCoderImpl__extract_componen, __pyx_k_TupleCoderImpl__extract_componen, sizeof(__pyx_k_TupleCoderImpl__extract_componen), 0, 0, 1, 1},
  {&__pyx_n_s_TupleSequenceCoderImpl, __pyx_k_TupleSequenceCoderImpl, sizeof(__pyx_k_TupleSequenceCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_TupleSequenceCoderImpl___reduce, __pyx_k_TupleSequenceCoderImpl___reduce, sizeof(__pyx_k_TupleSequenceCoderImpl___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_TupleSequenceCoderImpl___setstat, __pyx_k_TupleSequenceCoderImpl___setstat, sizeof(__pyx_k_TupleSequenceCoderImpl___setstat), 0, 0, 1, 1},
  {&__pyx_n_s_TupleSequenceCoderImpl__construc, __pyx_k_TupleSequenceCoderImpl__construc, sizeof(__pyx_k_TupleSequenceCoderImpl__construc), 0, 0, 1, 1},
  {&__pyx_n_s_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_UNICODE_TYPE, __pyx_k_UNICODE_TYPE, sizeof(__pyx_k_UNICODE_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_UNKNOWN, __pyx_k_UNKNOWN, sizeof(__pyx_k_UNKNOWN), 0, 0, 1, 1},
  {&__pyx_n_s_UNKNOWN_TYPE, __pyx_k_UNKNOWN_TYPE, sizeof(__pyx_k_UNKNOWN_TYPE), 0, 0, 1, 1},
  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
  {&__pyx_kp_u_Unable_to_deterministically_enco, __pyx_k_Unable_to_deterministically_enco, sizeof(__pyx_k_Unable_to_deterministically_enco), 0, 1, 0, 0},
  {&__pyx_kp_u_Unable_to_deterministically_enco_2, __pyx_k_Unable_to_deterministically_enco_2, sizeof(__pyx_k_Unable_to_deterministically_enco_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Unable_to_deterministically_orde, __pyx_k_Unable_to_deterministically_orde, sizeof(__pyx_k_Unable_to_deterministically_orde), 0, 1, 0, 0},
  {&__pyx_kp_u_Unable_to_deterministically_orde_2, __pyx_k_Unable_to_deterministically_orde_2, sizeof(__pyx_k_Unable_to_deterministically_orde_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Unknown_type_tag_x, __pyx_k_Unknown_type_tag_x, sizeof(__pyx_k_Unknown_type_tag_x), 0, 1, 0, 0},
  {&__pyx_kp_u_Using_fallback_deterministic_cod, __pyx_k_Using_fallback_deterministic_cod, sizeof(__pyx_k_Using_fallback_deterministic_cod), 0, 1, 0, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_VarIntCoderImpl, __pyx_k_VarIntCoderImpl, sizeof(__pyx_k_VarIntCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_VarIntCoderImpl___reduce_cython, __pyx_k_VarIntCoderImpl___reduce_cython, sizeof(__pyx_k_VarIntCoderImpl___reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_VarIntCoderImpl___setstate_cytho, __pyx_k_VarIntCoderImpl___setstate_cytho, sizeof(__pyx_k_VarIntCoderImpl___setstate_cytho), 0, 0, 1, 1},
  {&__pyx_n_s_VarIntCoderImpl_decode, __pyx_k_VarIntCoderImpl_decode, sizeof(__pyx_k_VarIntCoderImpl_decode), 0, 0, 1, 1},
  {&__pyx_n_s_VarIntCoderImpl_decode_from_stre, __pyx_k_VarIntCoderImpl_decode_from_stre, sizeof(__pyx_k_VarIntCoderImpl_decode_from_stre), 0, 0, 1, 1},
  {&__pyx_n_s_VarIntCoderImpl_encode, __pyx_k_VarIntCoderImpl_encode, sizeof(__pyx_k_VarIntCoderImpl_encode), 0, 0, 1, 1},
  {&__pyx_n_s_VarIntCoderImpl_encode_to_stream, __pyx_k_VarIntCoderImpl_encode_to_stream, sizeof(__pyx_k_VarIntCoderImpl_encode_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_VarIntCoderImpl_estimate_size, __pyx_k_VarIntCoderImpl_estimate_size, sizeof(__pyx_k_VarIntCoderImpl_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedValueCoderImpl, __pyx_k_WindowedValueCoderImpl, sizeof(__pyx_k_WindowedValueCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedValueCoderImpl___reduce, __pyx_k_WindowedValueCoderImpl___reduce, sizeof(__pyx_k_WindowedValueCoderImpl___reduce), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedValueCoderImpl___setstat, __pyx_k_WindowedValueCoderImpl___setstat, sizeof(__pyx_k_WindowedValueCoderImpl___setstat), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedValueCoderImpl_decode_fr, __pyx_k_WindowedValueCoderImpl_decode_fr, sizeof(__pyx_k_WindowedValueCoderImpl_decode_fr), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedValueCoderImpl_encode_to, __pyx_k_WindowedValueCoderImpl_encode_to, sizeof(__pyx_k_WindowedValueCoderImpl_encode_to), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedValueCoderImpl_get_estim, __pyx_k_WindowedValueCoderImpl_get_estim, sizeof(__pyx_k_WindowedValueCoderImpl_get_estim), 0, 0, 1, 1},
  {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0},
  {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0},
  {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
  {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
  {&__pyx_kp_b__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 0, 0},
  {&__pyx_kp_b__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 0, 0},
  {&__pyx_n_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 1},
  {&__pyx_kp_b__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 0, 0},
  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
  {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_coders, __pyx_k_apache_beam_coders, sizeof(__pyx_k_apache_beam_coders), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_coders_avro_record, __pyx_k_apache_beam_coders_avro_record, sizeof(__pyx_k_apache_beam_coders_avro_record), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_coders_coder_impl, __pyx_k_apache_beam_coders_coder_impl, sizeof(__pyx_k_apache_beam_coders_coder_impl), 0, 0, 1, 1},
  {&__pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_k_apache_beam_coders_coder_impl_py, sizeof(__pyx_k_apache_beam_coders_coder_impl_py), 0, 0, 1, 0},
  {&__pyx_n_s_apache_beam_coders_coders, __pyx_k_apache_beam_coders_coders, sizeof(__pyx_k_apache_beam_coders_coders), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_transforms, __pyx_k_apache_beam_transforms, sizeof(__pyx_k_apache_beam_transforms), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_transforms_window, __pyx_k_apache_beam_transforms_window, sizeof(__pyx_k_apache_beam_transforms_window), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_typehints_schemas, __pyx_k_apache_beam_typehints_schemas, sizeof(__pyx_k_apache_beam_typehints_schemas), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_utils, __pyx_k_apache_beam_utils, sizeof(__pyx_k_apache_beam_utils), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_utils_sharded_key, __pyx_k_apache_beam_utils_sharded_key, sizeof(__pyx_k_apache_beam_utils_sharded_key), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_utils_timestamp, __pyx_k_apache_beam_utils_timestamp, sizeof(__pyx_k_apache_beam_utils_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_argsort, __pyx_k_argsort, sizeof(__pyx_k_argsort), 0, 0, 1, 1},
  {&__pyx_n_s_as_tuple, __pyx_k_as_tuple, sizeof(__pyx_k_as_tuple), 0, 0, 1, 1},
  {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
  {&__pyx_n_s_atomic_type, __pyx_k_atomic_type, sizeof(__pyx_k_atomic_type), 0, 0, 1, 1},
  {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
  {&__pyx_n_s_base_2, __pyx_k_base_2, sizeof(__pyx_k_base_2), 0, 0, 1, 1},
  {&__pyx_n_u_big, __pyx_k_big, sizeof(__pyx_k_big), 0, 1, 0, 1},
  {&__pyx_n_s_bit_length, __pyx_k_bit_length, sizeof(__pyx_k_bit_length), 0, 0, 1, 1},
  {&__pyx_n_s_boolean_coder_impl, __pyx_k_boolean_coder_impl, sizeof(__pyx_k_boolean_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_bs, __pyx_k_bs, sizeof(__pyx_k_bs), 0, 0, 1, 1},
  {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1},
  {&__pyx_n_s_byteorder, __pyx_k_byteorder, sizeof(__pyx_k_byteorder), 0, 0, 1, 1},
  {&__pyx_n_s_bytes, __pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
  {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_clear_bit, __pyx_k_clear_bit, sizeof(__pyx_k_clear_bit), 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_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_coder_impl, __pyx_k_coder_impl, sizeof(__pyx_k_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_coder_impl_row_encoders, __pyx_k_coder_impl_row_encoders, sizeof(__pyx_k_coder_impl_row_encoders), 0, 0, 1, 1},
  {&__pyx_n_s_coder_impls, __pyx_k_coder_impls, sizeof(__pyx_k_coder_impls), 0, 0, 1, 1},
  {&__pyx_n_s_column, __pyx_k_column, sizeof(__pyx_k_column), 0, 0, 1, 1},
  {&__pyx_n_s_columns, __pyx_k_columns, sizeof(__pyx_k_columns), 0, 0, 1, 1},
  {&__pyx_n_s_components, __pyx_k_components, sizeof(__pyx_k_components), 0, 0, 1, 1},
  {&__pyx_n_s_construct_from_components, __pyx_k_construct_from_components, sizeof(__pyx_k_construct_from_components), 0, 0, 1, 1},
  {&__pyx_n_s_construct_from_sequence, __pyx_k_construct_from_sequence, sizeof(__pyx_k_construct_from_sequence), 0, 0, 1, 1},
  {&__pyx_n_s_contents, __pyx_k_contents, sizeof(__pyx_k_contents), 0, 0, 1, 1},
  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
  {&__pyx_n_s_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 0, 1, 1},
  {&__pyx_n_s_create_InputStream, __pyx_k_create_InputStream, sizeof(__pyx_k_create_InputStream), 0, 0, 1, 1},
  {&__pyx_n_u_create_InputStream, __pyx_k_create_InputStream, sizeof(__pyx_k_create_InputStream), 0, 1, 0, 1},
  {&__pyx_n_s_create_OutputStream, __pyx_k_create_OutputStream, sizeof(__pyx_k_create_OutputStream), 0, 0, 1, 1},
  {&__pyx_n_u_create_OutputStream, __pyx_k_create_OutputStream, sizeof(__pyx_k_create_OutputStream), 0, 1, 0, 1},
  {&__pyx_n_s_dataclass_params, __pyx_k_dataclass_params, sizeof(__pyx_k_dataclass_params), 0, 0, 1, 1},
  {&__pyx_n_s_dataclasses, __pyx_k_dataclasses, sizeof(__pyx_k_dataclasses), 0, 0, 1, 1},
  {&__pyx_n_s_decimal, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_decode_all, __pyx_k_decode_all, sizeof(__pyx_k_decode_all), 0, 0, 1, 1},
  {&__pyx_n_s_decode_batch_from_stream, __pyx_k_decode_batch_from_stream, sizeof(__pyx_k_decode_batch_from_stream), 0, 0, 1, 1},
  {&__pyx_n_s_decode_from_stream, __pyx_k_decode_from_stream, sizeof(__pyx_k_decode_from_stream), 0, 0, 1, 1},
  {&__pyx_n_s_decode_nested, __pyx_k_decode_nested, sizeof(__pyx_k_decode_nested), 0, 0, 1, 1},
  {&__pyx_n_s_decoder, __pyx_k_decoder, sizeof(__pyx_k_decoder), 0, 0, 1, 1},
  {&__pyx_kp_u_decoder_2, __pyx_k_decoder_2, sizeof(__pyx_k_decoder_2), 0, 1, 0, 0},
  {&__pyx_n_s_default_size_estimator, __pyx_k_default_size_estimator, sizeof(__pyx_k_default_size_estimator), 0, 0, 1, 1},
  {&__pyx_n_s_deserialize, __pyx_k_deserialize, sizeof(__pyx_k_deserialize), 0, 0, 1, 1},
  {&__pyx_n_s_dest, __pyx_k_dest, sizeof(__pyx_k_dest), 0, 0, 1, 1},
  {&__pyx_n_s_deterministic, __pyx_k_deterministic, sizeof(__pyx_k_deterministic), 0, 0, 1, 1},
  {&__pyx_n_s_deterministic_encoding_error_ms, __pyx_k_deterministic_encoding_error_ms, sizeof(__pyx_k_deterministic_encoding_error_ms), 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_dict_value, __pyx_k_dict_value, sizeof(__pyx_k_dict_value), 0, 0, 1, 1},
  {&__pyx_n_s_dill, __pyx_k_dill, sizeof(__pyx_k_dill), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
  {&__pyx_n_s_dumps, __pyx_k_dumps, sizeof(__pyx_k_dumps), 0, 0, 1, 1},
  {&__pyx_n_s_dynamic_timer_tag, __pyx_k_dynamic_timer_tag, sizeof(__pyx_k_dynamic_timer_tag), 0, 0, 1, 1},
  {&__pyx_n_s_elem, __pyx_k_elem, sizeof(__pyx_k_elem), 0, 0, 1, 1},
  {&__pyx_n_s_elem_coder, __pyx_k_elem_coder, sizeof(__pyx_k_elem_coder), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_encode_all, __pyx_k_encode_all, sizeof(__pyx_k_encode_all), 0, 0, 1, 1},
  {&__pyx_n_s_encode_batch_to_stream, __pyx_k_encode_batch_to_stream, sizeof(__pyx_k_encode_batch_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_encode_nested, __pyx_k_encode_nested, sizeof(__pyx_k_encode_nested), 0, 0, 1, 1},
  {&__pyx_n_s_encode_to_stream, __pyx_k_encode_to_stream, sizeof(__pyx_k_encode_to_stream), 0, 0, 1, 1},
  {&__pyx_n_s_encoded, __pyx_k_encoded, sizeof(__pyx_k_encoded), 0, 0, 1, 1},
  {&__pyx_n_s_encoder, __pyx_k_encoder, sizeof(__pyx_k_encoder), 0, 0, 1, 1},
  {&__pyx_n_s_encoding_position, __pyx_k_encoding_position, sizeof(__pyx_k_encoding_position), 0, 0, 1, 1},
  {&__pyx_n_s_encoding_positions_set, __pyx_k_encoding_positions_set, sizeof(__pyx_k_encoding_positions_set), 0, 0, 1, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_eq, __pyx_k_eq, sizeof(__pyx_k_eq), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_n_s_estimate_size, __pyx_k_estimate_size, sizeof(__pyx_k_estimate_size), 0, 0, 1, 1},
  {&__pyx_n_s_estimated_size, __pyx_k_estimated_size, sizeof(__pyx_k_estimated_size), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_exponent, __pyx_k_exponent, sizeof(__pyx_k_exponent), 0, 0, 1, 1},
  {&__pyx_n_s_extract_components, __pyx_k_extract_components, sizeof(__pyx_k_extract_components), 0, 0, 1, 1},
  {&__pyx_n_s_fallback_coder_impl, __pyx_k_fallback_coder_impl, sizeof(__pyx_k_fallback_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_fastavro, __pyx_k_fastavro, sizeof(__pyx_k_fastavro), 0, 0, 1, 1},
  {&__pyx_n_s_field_type, __pyx_k_field_type, sizeof(__pyx_k_field_type), 0, 0, 1, 1},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__pyx_n_u_fields_2, __pyx_k_fields_2, sizeof(__pyx_k_fields_2), 0, 1, 0, 1},
  {&__pyx_n_s_fillvalue, __pyx_k_fillvalue, sizeof(__pyx_k_fillvalue), 0, 0, 1, 1},
  {&__pyx_n_s_finalize_write, __pyx_k_finalize_write, sizeof(__pyx_k_finalize_write), 0, 0, 1, 1},
  {&__pyx_n_s_fire_timestamp, __pyx_k_fire_timestamp, sizeof(__pyx_k_fire_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_fits_in_64_bits, __pyx_k_fits_in_64_bits, sizeof(__pyx_k_fits_in_64_bits), 0, 0, 1, 1},
  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
  {&__pyx_kp_u_for_the_input_of, __pyx_k_for_the_input_of, sizeof(__pyx_k_for_the_input_of), 0, 1, 0, 0},
  {&__pyx_kp_u_for_the_input_of_2, __pyx_k_for_the_input_of_2, sizeof(__pyx_k_for_the_input_of_2), 0, 1, 0, 0},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
  {&__pyx_n_s_from_bytes, __pyx_k_from_bytes, sizeof(__pyx_k_from_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_from_proto, __pyx_k_from_proto, sizeof(__pyx_k_from_proto), 0, 0, 1, 1},
  {&__pyx_n_s_frozen, __pyx_k_frozen, sizeof(__pyx_k_frozen), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 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_count, __pyx_k_get_count, sizeof(__pyx_k_get_count), 0, 0, 1, 1},
  {&__pyx_n_s_get_estimated_size_and_observabl, __pyx_k_get_estimated_size_and_observabl, sizeof(__pyx_k_get_estimated_size_and_observabl), 0, 0, 1, 1},
  {&__pyx_n_s_get_impl, __pyx_k_get_impl, sizeof(__pyx_k_get_impl), 0, 0, 1, 1},
  {&__pyx_n_s_get_nested_size, __pyx_k_get_nested_size, sizeof(__pyx_k_get_nested_size), 0, 0, 1, 1},
  {&__pyx_n_s_get_varint_size, __pyx_k_get_varint_size, sizeof(__pyx_k_get_varint_size), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_u_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 1, 0, 1},
  {&__pyx_n_s_getvalue, __pyx_k_getvalue, sizeof(__pyx_k_getvalue), 0, 0, 1, 1},
  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
  {&__pyx_kp_u_has_encoding_positions_set_True, __pyx_k_has_encoding_positions_set_True, sizeof(__pyx_k_has_encoding_positions_set_True), 0, 1, 0, 0},
  {&__pyx_n_s_hash, __pyx_k_hash, sizeof(__pyx_k_hash), 0, 0, 1, 1},
  {&__pyx_n_s_head, __pyx_k_head, sizeof(__pyx_k_head), 0, 0, 1, 1},
  {&__pyx_n_s_head_2, __pyx_k_head_2, sizeof(__pyx_k_head_2), 0, 0, 1, 1},
  {&__pyx_n_s_hold_timestamp, __pyx_k_hold_timestamp, sizeof(__pyx_k_hold_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_in, __pyx_k_in, sizeof(__pyx_k_in), 0, 0, 1, 1},
  {&__pyx_n_s_in_stream, __pyx_k_in_stream, sizeof(__pyx_k_in_stream), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_init___locals_genexpr, __pyx_k_init___locals_genexpr, sizeof(__pyx_k_init___locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_inner_size, __pyx_k_inner_size, sizeof(__pyx_k_inner_size), 0, 0, 1, 1},
  {&__pyx_n_s_input_stream, __pyx_k_input_stream, sizeof(__pyx_k_input_stream), 0, 0, 1, 1},
  {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 1, 0, 1},
  {&__pyx_n_s_io, __pyx_k_io, sizeof(__pyx_k_io), 0, 0, 1, 1},
  {&__pyx_n_s_is_compiled, __pyx_k_is_compiled, sizeof(__pyx_k_is_compiled), 0, 0, 1, 1},
  {&__pyx_n_s_is_dataclass, __pyx_k_is_dataclass, sizeof(__pyx_k_is_dataclass), 0, 0, 1, 1},
  {&__pyx_n_s_is_deterministic, __pyx_k_is_deterministic, sizeof(__pyx_k_is_deterministic), 0, 0, 1, 1},
  {&__pyx_n_s_is_first, __pyx_k_is_first, sizeof(__pyx_k_is_first), 0, 0, 1, 1},
  {&__pyx_n_s_is_last, __pyx_k_is_last, sizeof(__pyx_k_is_last), 0, 0, 1, 1},
  {&__pyx_n_s_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
  {&__pyx_n_s_iterable_coder_uses_abstract_it, __pyx_k_iterable_coder_uses_abstract_it, sizeof(__pyx_k_iterable_coder_uses_abstract_it), 0, 0, 1, 1},
  {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
  {&__pyx_n_s_json, __pyx_k_json, sizeof(__pyx_k_json), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_key_coder, __pyx_k_key_coder, sizeof(__pyx_k_key_coder), 0, 0, 1, 1},
  {&__pyx_n_s_key_coder_impl, __pyx_k_key_coder_impl, sizeof(__pyx_k_key_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_key_coder_impl_2, __pyx_k_key_coder_impl_2, sizeof(__pyx_k_key_coder_impl_2), 0, 0, 1, 1},
  {&__pyx_n_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1},
  {&__pyx_kp_u_latin_1, __pyx_k_latin_1, sizeof(__pyx_k_latin_1), 0, 1, 0, 0},
  {&__pyx_n_u_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 1, 0, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 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_logical_type, __pyx_k_logical_type, sizeof(__pyx_k_logical_type), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_max_timestamp, __pyx_k_max_timestamp, sizeof(__pyx_k_max_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
  {&__pyx_n_s_message_types, __pyx_k_message_types, sizeof(__pyx_k_message_types), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_micros, __pyx_k_micros, sizeof(__pyx_k_micros), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 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_named_tuple_from_schema, __pyx_k_named_tuple_from_schema, sizeof(__pyx_k_named_tuple_from_schema), 0, 0, 1, 1},
  {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 0, 1, 1},
  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
  {&__pyx_n_s_nested, __pyx_k_nested, sizeof(__pyx_k_nested), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_nonspeculative_index, __pyx_k_nonspeculative_index, sizeof(__pyx_k_nonspeculative_index), 0, 0, 1, 1},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_null_flags, __pyx_k_null_flags, sizeof(__pyx_k_null_flags), 0, 0, 1, 1},
  {&__pyx_n_s_null_indicator, __pyx_k_null_indicator, sizeof(__pyx_k_null_indicator), 0, 0, 1, 1},
  {&__pyx_n_s_nullable, __pyx_k_nullable, sizeof(__pyx_k_nullable), 0, 0, 1, 1},
  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_observable, __pyx_k_observable, sizeof(__pyx_k_observable), 0, 0, 1, 1},
  {&__pyx_kp_u_of_type, __pyx_k_of_type, sizeof(__pyx_k_of_type), 0, 1, 0, 0},
  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
  {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
  {&__pyx_n_s_pane_info, __pyx_k_pane_info, sizeof(__pyx_k_pane_info), 0, 0, 1, 1},
  {&__pyx_n_s_pane_info_coder_impl, __pyx_k_pane_info_coder_impl, sizeof(__pyx_k_pane_info_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_paneinfo, __pyx_k_paneinfo, sizeof(__pyx_k_paneinfo), 0, 0, 1, 1},
  {&__pyx_n_s_parse_schema, __pyx_k_parse_schema, sizeof(__pyx_k_parse_schema), 0, 0, 1, 1},
  {&__pyx_n_s_parsed_schema, __pyx_k_parsed_schema, sizeof(__pyx_k_parsed_schema), 0, 0, 1, 1},
  {&__pyx_n_s_past_unicode, __pyx_k_past_unicode, sizeof(__pyx_k_past_unicode), 0, 0, 1, 1},
  {&__pyx_n_s_payload, __pyx_k_payload, sizeof(__pyx_k_payload), 0, 0, 1, 1},
  {&__pyx_n_s_pb, __pyx_k_pb, sizeof(__pyx_k_pb), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_kp_u_please_provide_a_type_hint_for, __pyx_k_please_provide_a_type_hint_for, sizeof(__pyx_k_please_provide_a_type_hint_for), 0, 1, 0, 0},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_proto, __pyx_k_proto, sizeof(__pyx_k_proto), 0, 0, 1, 1},
  {&__pyx_n_s_proto_message, __pyx_k_proto_message, sizeof(__pyx_k_proto_message), 0, 0, 1, 1},
  {&__pyx_n_s_proto_message_type, __pyx_k_proto_message_type, sizeof(__pyx_k_proto_message_type), 0, 0, 1, 1},
  {&__pyx_n_s_proto_plus_type, __pyx_k_proto_plus_type, sizeof(__pyx_k_proto_plus_type), 0, 0, 1, 1},
  {&__pyx_n_s_proto_utils, __pyx_k_proto_utils, sizeof(__pyx_k_proto_utils), 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_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 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_AbstractComponent, __pyx_k_pyx_unpickle_AbstractComponent, sizeof(__pyx_k_pyx_unpickle_AbstractComponent), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BigEndianShortCod, __pyx_k_pyx_unpickle_BigEndianShortCod, sizeof(__pyx_k_pyx_unpickle_BigEndianShortCod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BigIntegerCoderIm, __pyx_k_pyx_unpickle_BigIntegerCoderIm, sizeof(__pyx_k_pyx_unpickle_BigIntegerCoderIm), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BooleanCoderImpl, __pyx_k_pyx_unpickle_BooleanCoderImpl, sizeof(__pyx_k_pyx_unpickle_BooleanCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_BytesCoderImpl, __pyx_k_pyx_unpickle_BytesCoderImpl, sizeof(__pyx_k_pyx_unpickle_BytesCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CallbackCoderImpl, __pyx_k_pyx_unpickle_CallbackCoderImpl, sizeof(__pyx_k_pyx_unpickle_CallbackCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_CoderImpl, __pyx_k_pyx_unpickle_CoderImpl, sizeof(__pyx_k_pyx_unpickle_CoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_DecimalCoderImpl, __pyx_k_pyx_unpickle_DecimalCoderImpl, sizeof(__pyx_k_pyx_unpickle_DecimalCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_FastPrimitivesCod, __pyx_k_pyx_unpickle_FastPrimitivesCod, sizeof(__pyx_k_pyx_unpickle_FastPrimitivesCod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_FloatCoderImpl, __pyx_k_pyx_unpickle_FloatCoderImpl, sizeof(__pyx_k_pyx_unpickle_FloatCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_GenericRowColumnE, __pyx_k_pyx_unpickle_GenericRowColumnE, sizeof(__pyx_k_pyx_unpickle_GenericRowColumnE), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IntervalWindowCod, __pyx_k_pyx_unpickle_IntervalWindowCod, sizeof(__pyx_k_pyx_unpickle_IntervalWindowCod), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_IterableCoderImpl, __pyx_k_pyx_unpickle_IterableCoderImpl, sizeof(__pyx_k_pyx_unpickle_IterableCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_LengthPrefixCoder, __pyx_k_pyx_unpickle_LengthPrefixCoder, sizeof(__pyx_k_pyx_unpickle_LengthPrefixCoder), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ListCoderImpl, __pyx_k_pyx_unpickle_ListCoderImpl, sizeof(__pyx_k_pyx_unpickle_ListCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_LogicalTypeCoderI, __pyx_k_pyx_unpickle_LogicalTypeCoderI, sizeof(__pyx_k_pyx_unpickle_LogicalTypeCoderI), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_MapCoderImpl, __pyx_k_pyx_unpickle_MapCoderImpl, sizeof(__pyx_k_pyx_unpickle_MapCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_PaneInfoCoderImpl, __pyx_k_pyx_unpickle_PaneInfoCoderImpl, sizeof(__pyx_k_pyx_unpickle_PaneInfoCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_ParamWindowedValu, __pyx_k_pyx_unpickle_ParamWindowedValu, sizeof(__pyx_k_pyx_unpickle_ParamWindowedValu), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_RowCoderImpl, __pyx_k_pyx_unpickle_RowCoderImpl, sizeof(__pyx_k_pyx_unpickle_RowCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_RowColumnEncoder, __pyx_k_pyx_unpickle_RowColumnEncoder, sizeof(__pyx_k_pyx_unpickle_RowColumnEncoder), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SequenceCoderImpl, __pyx_k_pyx_unpickle_SequenceCoderImpl, sizeof(__pyx_k_pyx_unpickle_SequenceCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SimpleCoderImpl, __pyx_k_pyx_unpickle_SimpleCoderImpl, sizeof(__pyx_k_pyx_unpickle_SimpleCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SinglePrecisionFl, __pyx_k_pyx_unpickle_SinglePrecisionFl, sizeof(__pyx_k_pyx_unpickle_SinglePrecisionFl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_SingletonCoderImp, __pyx_k_pyx_unpickle_SingletonCoderImp, sizeof(__pyx_k_pyx_unpickle_SingletonCoderImp), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_StreamCoderImpl, __pyx_k_pyx_unpickle_StreamCoderImpl, sizeof(__pyx_k_pyx_unpickle_StreamCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TimestampCoderImp, __pyx_k_pyx_unpickle_TimestampCoderImp, sizeof(__pyx_k_pyx_unpickle_TimestampCoderImp), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TupleCoderImpl, __pyx_k_pyx_unpickle_TupleCoderImpl, sizeof(__pyx_k_pyx_unpickle_TupleCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_TupleSequenceCode, __pyx_k_pyx_unpickle_TupleSequenceCode, sizeof(__pyx_k_pyx_unpickle_TupleSequenceCode), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_VarIntCoderImpl, __pyx_k_pyx_unpickle_VarIntCoderImpl, sizeof(__pyx_k_pyx_unpickle_VarIntCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_WindowedValueCode, __pyx_k_pyx_unpickle_WindowedValueCode, sizeof(__pyx_k_pyx_unpickle_WindowedValueCode), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__AbstractIterable, __pyx_k_pyx_unpickle__AbstractIterable, sizeof(__pyx_k_pyx_unpickle__AbstractIterable), 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_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_read_byte, __pyx_k_read_byte, sizeof(__pyx_k_read_byte), 0, 0, 1, 1},
  {&__pyx_n_s_read_state, __pyx_k_read_state, sizeof(__pyx_k_read_state), 0, 0, 1, 1},
  {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
  {&__pyx_n_s_register_iterable_like_type, __pyx_k_register_iterable_like_type, sizeof(__pyx_k_register_iterable_like_type), 0, 0, 1, 1},
  {&__pyx_n_s_representation_coder, __pyx_k_representation_coder, sizeof(__pyx_k_representation_coder), 0, 0, 1, 1},
  {&__pyx_n_s_requires_deterministic_step_labe, __pyx_k_requires_deterministic_step_labe, sizeof(__pyx_k_requires_deterministic_step_labe), 0, 0, 1, 1},
  {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
  {&__pyx_n_s_row_coders_registered, __pyx_k_row_coders_registered, sizeof(__pyx_k_row_coders_registered), 0, 0, 1, 1},
  {&__pyx_n_s_row_column_encoders, __pyx_k_row_column_encoders, sizeof(__pyx_k_row_column_encoders), 0, 0, 1, 1},
  {&__pyx_n_s_scaleb, __pyx_k_scaleb, sizeof(__pyx_k_scaleb), 0, 0, 1, 1},
  {&__pyx_n_s_schema, __pyx_k_schema, sizeof(__pyx_k_schema), 0, 0, 1, 1},
  {&__pyx_n_s_schemaless_reader, __pyx_k_schemaless_reader, sizeof(__pyx_k_schemaless_reader), 0, 0, 1, 1},
  {&__pyx_n_s_schemaless_writer, __pyx_k_schemaless_writer, sizeof(__pyx_k_schemaless_writer), 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_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_u_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 1, 0, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
  {&__pyx_n_s_shard_id, __pyx_k_shard_id, sizeof(__pyx_k_shard_id), 0, 0, 1, 1},
  {&__pyx_n_s_shard_id_2, __pyx_k_shard_id_2, sizeof(__pyx_k_shard_id_2), 0, 0, 1, 1},
  {&__pyx_n_s_shard_id_coder_impl, __pyx_k_shard_id_coder_impl, sizeof(__pyx_k_shard_id_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_signed, __pyx_k_signed, sizeof(__pyx_k_signed), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_size_estimator, __pyx_k_size_estimator, sizeof(__pyx_k_size_estimator), 0, 0, 1, 1},
  {&__pyx_n_s_slow_stream, __pyx_k_slow_stream, sizeof(__pyx_k_slow_stream), 0, 0, 1, 1},
  {&__pyx_n_s_small_ints, __pyx_k_small_ints, sizeof(__pyx_k_small_ints), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_tag_coder_impl, __pyx_k_tag_coder_impl, sizeof(__pyx_k_tag_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 0, 0, 1, 1},
  {&__pyx_n_s_tail_2, __pyx_k_tail_2, sizeof(__pyx_k_tail_2), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 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_timestamp_coder, __pyx_k_timestamp_coder, sizeof(__pyx_k_timestamp_coder), 0, 0, 1, 1},
  {&__pyx_n_s_timestamp_coder_impl, __pyx_k_timestamp_coder_impl, sizeof(__pyx_k_timestamp_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_timestamp_micros, __pyx_k_timestamp_micros, sizeof(__pyx_k_timestamp_micros), 0, 0, 1, 1},
  {&__pyx_n_s_timing, __pyx_k_timing, sizeof(__pyx_k_timing), 0, 0, 1, 1},
  {&__pyx_n_s_to_bytes, __pyx_k_to_bytes, sizeof(__pyx_k_to_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_to_language_type, __pyx_k_to_language_type, sizeof(__pyx_k_to_language_type), 0, 0, 1, 1},
  {&__pyx_n_s_to_representation_type, __pyx_k_to_representation_type, sizeof(__pyx_k_to_representation_type), 0, 0, 1, 1},
  {&__pyx_n_s_typ, __pyx_k_typ, sizeof(__pyx_k_typ), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_typing, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
  {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1},
  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
  {&__pyx_n_s_unpickle_named_tuple, __pyx_k_unpickle_named_tuple, sizeof(__pyx_k_unpickle_named_tuple), 0, 0, 1, 1},
  {&__pyx_n_s_unpickle_type, __pyx_k_unpickle_type, sizeof(__pyx_k_unpickle_type), 0, 0, 1, 1},
  {&__pyx_n_s_unpickle_type_locals_lambda, __pyx_k_unpickle_type_locals_lambda, sizeof(__pyx_k_unpickle_type_locals_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_unpickled_types, __pyx_k_unpickled_types, sizeof(__pyx_k_unpickled_types), 0, 0, 1, 1},
  {&__pyx_n_s_unused_value, __pyx_k_unused_value, sizeof(__pyx_k_unused_value), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_use_abstract_iterable, __pyx_k_use_abstract_iterable, sizeof(__pyx_k_use_abstract_iterable), 0, 0, 1, 1},
  {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_user_key, __pyx_k_user_key, sizeof(__pyx_k_user_key), 0, 0, 1, 1},
  {&__pyx_n_s_userstate, __pyx_k_userstate, sizeof(__pyx_k_userstate), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_coder, __pyx_k_value_coder, sizeof(__pyx_k_value_coder), 0, 0, 1, 1},
  {&__pyx_n_s_value_coder_2, __pyx_k_value_coder_2, sizeof(__pyx_k_value_coder_2), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1},
  {&__pyx_n_s_window_coder, __pyx_k_window_coder, sizeof(__pyx_k_window_coder), 0, 0, 1, 1},
  {&__pyx_n_s_window_coder_impl, __pyx_k_window_coder_impl, sizeof(__pyx_k_window_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_window_coder_impl_2, __pyx_k_window_coder_impl_2, sizeof(__pyx_k_window_coder_impl_2), 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_windowed_value_coder, __pyx_k_windowed_value_coder, sizeof(__pyx_k_windowed_value_coder), 0, 0, 1, 1},
  {&__pyx_n_s_windows, __pyx_k_windows, sizeof(__pyx_k_windows), 0, 0, 1, 1},
  {&__pyx_n_s_windows_coder_impl, __pyx_k_windows_coder_impl, sizeof(__pyx_k_windows_coder_impl), 0, 0, 1, 1},
  {&__pyx_n_s_write_byte, __pyx_k_write_byte, sizeof(__pyx_k_write_byte), 0, 0, 1, 1},
  {&__pyx_n_s_write_state, __pyx_k_write_state, sizeof(__pyx_k_write_state), 0, 0, 1, 1},
  {&__pyx_n_s_write_state_threshold, __pyx_k_write_state_threshold, sizeof(__pyx_k_write_state_threshold), 0, 0, 1, 1},
  {&__pyx_n_s_wv, __pyx_k_wv, sizeof(__pyx_k_wv), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
  {&__pyx_n_s_zip_longest, __pyx_k_zip_longest, sizeof(__pyx_k_zip_longest), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 73, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 368, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 1087, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 134, __pyx_L1_error)
  __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(0, 398, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 433, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 558, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 586, __pyx_L1_error)
  __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) __PYX_ERR(0, 943, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1034, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 1319, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 149, __pyx_L1_error)
  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 406, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 615, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 834, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

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

  /* "apache_beam/coders/coder_impl.py":841
 *         from apache_beam.transforms.window import IntervalWindow
 *     # instantiating with None is not part of the public interface
 *     typed_value = IntervalWindow(None, None)  # type: ignore[arg-type]             # <<<<<<<<<<<<<<
 *     typed_value._end_micros = (
 *         1000 * self._to_normal_time(in_.read_bigendian_uint64()))
 */
  __pyx_tuple__6 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "apache_beam/coders/coder_impl.py":1023
 *     values = self._extract_components(value)
 *     if len(self._coder_impls) != len(values):
 *       raise ValueError('Number of components does not match number of coders.')             # <<<<<<<<<<<<<<
 *     for i in range(0, len(self._coder_impls)):
 *       c = self._coder_impls[i]  # type cast
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Number_of_components_does_not_ma); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "apache_beam/coders/coder_impl.py":1069
 *   def encode(self, value):
 *     assert issubclass(type(value), AvroRecord)
 *     with BytesIO() as buf:             # <<<<<<<<<<<<<<
 *       schemaless_writer(buf, self.parsed_schema, value.record)
 *       return buf.getvalue()
 */
  __pyx_tuple__9 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "apache_beam/coders/coder_impl.py":1231
 *       if count == -1:
 *         if self._read_state is None:
 *           raise ValueError(             # <<<<<<<<<<<<<<
 *               'Cannot read state-written iterable without state reader.')
 * 
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_Cannot_read_state_written_iterab); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "apache_beam/coders/coder_impl.py":1790
 *         attr_null_flags = attr.null_flags()
 *         if attr_null_flags is not None and attr_null_flags.any():
 *           null_flags_py[:, i] = attr_null_flags             # <<<<<<<<<<<<<<
 *           null_bits_py[:, i // 8] |= attr_null_flags << np.uint8(i % 8)
 *       has_null_bits = (null_bits_py.sum(axis=1) != 0).astype(np.uint8)
 */
  __pyx_slice__14 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 1790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__14);
  __Pyx_GIVEREF(__pyx_slice__14);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_tuple__15 = PyTuple_Pack(3, __pyx_int_222419149, __pyx_int_238750788, __pyx_int_228825662); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);
  __pyx_tuple__16 = PyTuple_Pack(3, __pyx_int_226081823, __pyx_int_140927196, __pyx_int_172633095); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);
  __pyx_tuple__17 = PyTuple_Pack(3, __pyx_int_36447268, __pyx_int_10585166, __pyx_int_102880368); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);
  __pyx_tuple__18 = PyTuple_Pack(3, __pyx_int_772173, __pyx_int_51847764, __pyx_int_173814568); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);
  __pyx_tuple__19 = PyTuple_Pack(3, __pyx_int_18374862, __pyx_int_107408500, __pyx_int_157115109); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);
  __pyx_tuple__20 = PyTuple_Pack(3, __pyx_int_235957399, __pyx_int_196964917, __pyx_int_16430586); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_tuple__21 = PyTuple_Pack(3, __pyx_int_90923958, __pyx_int_264067927, __pyx_int_38623158); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);
  __pyx_tuple__22 = PyTuple_Pack(3, __pyx_int_190324669, __pyx_int_120365723, __pyx_int_25546916); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_tuple__23 = PyTuple_Pack(3, __pyx_int_213871712, __pyx_int_125584289, __pyx_int_109055100); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);
  __pyx_tuple__24 = PyTuple_Pack(3, __pyx_int_63293558, __pyx_int_260527683, __pyx_int_239948688); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);
  __pyx_tuple__25 = PyTuple_Pack(3, __pyx_int_133669511, __pyx_int_113116285, __pyx_int_142505101); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_tuple__26 = PyTuple_Pack(3, __pyx_int_140638058, __pyx_int_4374576, __pyx_int_206513719); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);
  __pyx_tuple__27 = PyTuple_Pack(3, __pyx_int_91790965, __pyx_int_134056825, __pyx_int_5753188); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);
  __pyx_tuple__28 = PyTuple_Pack(3, __pyx_int_256189473, __pyx_int_112010984, __pyx_int_254493288); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);
  __pyx_tuple__29 = PyTuple_Pack(3, __pyx_int_12649985, __pyx_int_254493075, __pyx_int_88144501); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);
  __pyx_tuple__30 = PyTuple_Pack(3, __pyx_int_17783873, __pyx_int_192480703, __pyx_int_48664042); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "View.MemoryView":134
 * 
 *         if not self.ndim:
 *             raise ValueError("Empty shape tuple for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if itemsize <= 0:
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "View.MemoryView":137
 * 
 *         if itemsize <= 0:
 *             raise ValueError("itemsize <= 0 for cython.array")             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(format, bytes):
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "View.MemoryView":149
 * 
 *         if not self._shape:
 *             raise MemoryError("unable to allocate shape and strides.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "View.MemoryView":177
 *             self.data = <char *>malloc(self.len)
 *             if not self.data:
 *                 raise MemoryError("unable to allocate array data.")             # <<<<<<<<<<<<<<
 * 
 *             if self.dtype_is_object:
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "View.MemoryView":193
 *             bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
 *         if not (flags & bufmode):
 *             raise ValueError("Can only create a buffer that is contiguous in memory.")             # <<<<<<<<<<<<<<
 *         info.buf = self.data
 *         info.len = self.len
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "View.MemoryView":420
 *     def __setitem__(memoryview self, object index, object value):
 *         if self.view.readonly:
 *             raise TypeError("Cannot assign to read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         have_slices, index = _unellipsify(index, self.view.ndim)
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "View.MemoryView":497
 *             result = struct.unpack(self.view.format, bytesitem)
 *         except struct.error:
 *             raise ValueError("Unable to convert item to object")             # <<<<<<<<<<<<<<
 *         else:
 *             if len(self.view.format) == 1:
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "View.MemoryView":522
 *     def __getbuffer__(self, Py_buffer *info, int flags):
 *         if flags & PyBUF_WRITABLE and self.view.readonly:
 *             raise ValueError("Cannot create writable memory view from read-only memoryview")             # <<<<<<<<<<<<<<
 * 
 *         if flags & PyBUF_ND:
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "View.MemoryView":572
 *         if self.view.strides == NULL:
 * 
 *             raise ValueError("Buffer view does not expose strides")             # <<<<<<<<<<<<<<
 * 
 *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "View.MemoryView":579
 *     def suboffsets(self):
 *         if self.view.suboffsets == NULL:
 *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
 * 
 *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
 */
  __pyx_tuple__42 = PyTuple_New(1); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_INCREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_tuple__42, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "View.MemoryView":705
 *     for suboffset in suboffsets[:ndim]:
 *         if suboffset >= 0:
 *             raise ValueError("Indirect dimensions not supported")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);
  __pyx_tuple__48 = PyTuple_Pack(3, __pyx_int_184977713, __pyx_int_136983863, __pyx_int_112105877); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "apache_beam/coders/coder_impl.py":130
 * class CoderImpl(object):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 * 
 */
  __pyx_tuple__49 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);
  __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 130, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":136
 *     raise NotImplementedError
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 * 
 */
  __pyx_tuple__51 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 136, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":142
 *     raise NotImplementedError
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 * 
 */
  __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);
  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 142, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":148
 *     raise NotImplementedError
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 * 
 */
  __pyx_tuple__55 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 148, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":154
 *     raise NotImplementedError
 * 
 *   def encode_all(self, values):             # <<<<<<<<<<<<<<
 *     # type: (Iterable[Any]) -> bytes
 *     out = create_OutputStream()
 */
  __pyx_tuple__57 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_out, __pyx_n_s_value); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_all, 154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 154, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":161
 *     return out.get()
 * 
 *   def decode_all(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Iterator[Any]
 *     input_stream = create_InputStream(encoded)
 */
  __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_encoded, __pyx_n_s_input_stream); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_all, 161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 161, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":167
 *       yield self.decode_from_stream(input_stream, True)
 * 
 *   def encode_nested(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 */
  __pyx_tuple__60 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_nested, 167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 167, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":173
 *     return out.get()
 * 
 *   def decode_nested(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 */
  __pyx_tuple__62 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);
  __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__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_nested, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 173, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":177
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_tuple__64 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 177, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":185
 *     return out.get_count()
 * 
 *   def _get_nested_size(self, inner_size, nested):             # <<<<<<<<<<<<<<
 *     if not nested:
 *       return inner_size
 */
  __pyx_tuple__66 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_inner_size, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_nested_size, 185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 185, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":191
 *     return varint_size + inner_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */
  __pyx_tuple__68 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 191, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__70 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__72 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":216
 * 
 *   Subclass of CoderImpl implementing stream methods using encode/decode."""
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 * 
 */
  __pyx_tuple__74 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 216, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 216, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":222
 *     stream.write(self.encode(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 * 
 */
  __pyx_tuple__76 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 222, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 222, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__78 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__80 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":233
 * 
 *   Subclass of CoderImpl implementing encode/decode using stream methods."""
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 */
  __pyx_tuple__82 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 233, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":239
 *     return out.get()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 */
  __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (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_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 239, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":243
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_tuple__86 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_coders_coder_impl_py, __pyx_n_s_estimate_size, 243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 243, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__88 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":265
 *     self._size_estimator = size_estimator or self._default_size_estimator
 * 
 *   def _default_size_estimator(self, value):             # <<<<<<<<<<<<<<
 *     return len(self.encode(value))
 * 
 */
  __pyx_tuple__92 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_default_size_estimator, 265, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 265, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":268
 *     return len(self.encode(value))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     return stream.write(self._encoder(value), nested)
 */
  __pyx_tuple__94 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 268, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 268, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":272
 *     return stream.write(self._encoder(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._decoder(stream.read_all(nested))
 */
  __pyx_tuple__96 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 272, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":276
 *     return self._decoder(stream.read_all(nested))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return self._encoder(value)
 * 
 */
  __pyx_tuple__98 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 276, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":279
 *     return self._encoder(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._decoder(encoded)
 * 
 */
  __pyx_tuple__100 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 279, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":282
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return self._get_nested_size(self._size_estimator(value), nested)
 */
  __pyx_tuple__102 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);
  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_coders_coder_impl_py, __pyx_n_s_estimate_size, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 282, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":286
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     # TODO(robertwb): Remove this once all coders are correct.
 */
  __pyx_tuple__104 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 286, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 286, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__106 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__108 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":302
 * class ProtoCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_message_type):             # <<<<<<<<<<<<<<
 *     self.proto_message_type = proto_message_type
 * 
 */
  __pyx_tuple__110 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_proto_message_type); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_coders_coder_impl_py, __pyx_n_s_init, 302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 302, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":305
 *     self.proto_message_type = proto_message_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializePartialToString()
 * 
 */
  __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);
  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 305, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":308
 *     return value.SerializePartialToString()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)  # This is in effect "ParsePartial".
 */
  __pyx_tuple__114 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_encoded, __pyx_n_s_proto_message); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 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_coders_coder_impl_py, __pyx_n_s_decode, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 308, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":316
 * class DeterministicProtoCoderImpl(ProtoCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializePartialToString(deterministic=True)
 * 
 */
  __pyx_tuple__116 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_coders_coder_impl_py, __pyx_n_s_encode, 316, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 316, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":322
 * class ProtoPlusCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_plus_type):             # <<<<<<<<<<<<<<
 *     # type: (Type[proto.Message]) -> None
 *     self.proto_plus_type = proto_plus_type
 */
  __pyx_tuple__118 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_proto_plus_type); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);
  __pyx_codeobj__119 = (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_coders_coder_impl_py, __pyx_n_s_init, 322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 322, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":326
 *     self.proto_plus_type = proto_plus_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value._pb.SerializePartialToString(deterministic=True)
 * 
 */
  __pyx_tuple__120 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 326, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 326, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":329
 *     return value._pb.SerializePartialToString(deterministic=True)
 * 
 *   def decode(self, value):             # <<<<<<<<<<<<<<
 *     return self.proto_plus_type.deserialize(value)
 * 
 */
  __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (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_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 329, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":369
 * 
 *   @staticmethod
 *   def register_iterable_like_type(t):             # <<<<<<<<<<<<<<
 *     _ITERABLE_LIKE_TYPES.add(t)
 * 
 */
  __pyx_tuple__124 = PyTuple_Pack(1, __pyx_n_s_t); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_register_iterable_like_type, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 369, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":372
 *     _ITERABLE_LIKE_TYPES.add(t)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     if isinstance(value, observable.ObservableMixin):
 */
  __pyx_tuple__126 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 372, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":382
 *     return out.get_count(), []
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     t = type(value)
 */
  __pyx_tuple__128 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 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_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 382, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":522
 *       raise TypeError(self._deterministic_encoding_error_msg(value))
 * 
 *   def _deterministic_encoding_error_msg(self, value):             # <<<<<<<<<<<<<<
 *     return (
 *         "Unable to deterministically encode '%s' of type '%s', "
 */
  __pyx_tuple__130 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_coders_coder_impl_py, __pyx_n_s_deterministic_encoding_error_ms, 522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 522, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":534
 *     return _unpickle_type(stream.read_all(True))
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     t = stream.read_byte()
 */
  __pyx_tuple__132 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 534, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 534, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__134 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__136 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":592
 * 
 * 
 * def _unpickle_type(bs):             # <<<<<<<<<<<<<<
 *   t = _unpickled_types.get(bs, None)
 *   if t is None:
 */
  __pyx_tuple__138 = PyTuple_Pack(2, __pyx_n_s_bs, __pyx_n_s_t); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_unpickle_type, 592, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 592, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":605
 * 
 * 
 * def _unpickle_named_tuple(bs, items):             # <<<<<<<<<<<<<<
 *   return _unpickle_type(bs)(*items)
 * 
 */
  __pyx_tuple__140 = PyTuple_Pack(2, __pyx_n_s_bs, __pyx_n_s_items); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_unpickle_named_tuple, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 605, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":613
 * 
 *   A coder for bytes/str objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (bytes, create_OutputStream, bool) -> None
 * 
 */
  __pyx_tuple__142 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);
  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 613, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":623
 *     out.write(value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> bytes
 *     return in_stream.read_all(nested)
 */
  __pyx_tuple__144 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);
  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 623, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":627
 *     return in_stream.read_all(nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert isinstance(value, bytes), (value, type(value))
 *     return value
 */
  __pyx_tuple__146 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 627, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":631
 *     return value
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return encoded
 * 
 */
  __pyx_tuple__148 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 631, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__150 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);
  __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__152 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":639
 * 
 *   A coder for bool objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_byte(1 if value else 0)
 * 
 */
  __pyx_tuple__154 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 639, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":642
 *     out.write_byte(1 if value else 0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value = in_stream.read_byte()
 *     if value == 0:
 */
  __pyx_tuple__156 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 642, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 642, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":650
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return b'\x01' if value else b'\x00'
 * 
 */
  __pyx_tuple__158 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 650, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":653
 *     return b'\x01' if value else b'\x00'
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     value = ord(encoded)
 *     if value == 0:
 */
  __pyx_tuple__160 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 653, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":661
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that booleans are encoded the same way regardless of nesting.
 *     return 1
 */
  __pyx_tuple__162 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unused_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 661, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 661, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__164 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__166 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);
  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":688
 *     self._is_deterministic = is_deterministic
 * 
 *   def encode_to_stream(self, dict_value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_bigendian_int32(len(dict_value))
 *     # Note this implementation always uses nested context when encoding keys
 */
  __pyx_tuple__168 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_dict_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);
  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 688, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":703
 *         self._value_coder.encode_to_stream(value, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     size = in_stream.read_bigendian_int32()
 *     result = {}
 */
  __pyx_tuple__170 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);
  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 703, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 703, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":715
 *     return result
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     estimate = 4  # 4 bytes for int32 size prefix
 *     for key, value in unused_value.items():
 */
  __pyx_tuple__172 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unused_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 715, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__174 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__176 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":731
 *   ENCODE_PRESENT = 1
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       value_coder  # type: CoderImpl
 */
  __pyx_tuple__178 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value_coder); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_init, 731, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 731, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":737
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     if value is None:
 *       out.write_byte(self.ENCODE_NULL)
 */
  __pyx_tuple__180 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 737, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 737, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":744
 *       self._value_coder.encode_to_stream(value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     null_indicator = in_stream.read_byte()
 *     if null_indicator == self.ENCODE_NULL:
 */
  __pyx_tuple__182 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested, __pyx_n_s_null_indicator); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 744, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 744, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":755
 *           null_indicator)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     return 1 + (
 *         self._value_coder.estimate_size(unused_value)
 */
  __pyx_tuple__184 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unused_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 755, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 755, __pyx_L1_error)
  __pyx_tuple__186 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);

  /* "apache_beam/coders/coder_impl.py":763
 * class BigEndianShortCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_bigendian_int16(value)
 */
  __pyx_tuple__187 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 763, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 763, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":767
 *     out.write_bigendian_int16(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_int16()
 */
  __pyx_tuple__189 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 767, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":771
 *     return in_stream.read_bigendian_int16()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A short is encoded as 2 bytes, regardless of nesting.
 */
  __pyx_tuple__191 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unused_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 771, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 771, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__193 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__195 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":779
 * class SinglePrecisionFloatCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_float(value)
 */
  __pyx_tuple__197 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 779, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 779, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":783
 *     out.write_bigendian_float(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_float()
 */
  __pyx_tuple__199 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 783, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 783, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":787
 *     return in_stream.read_bigendian_float()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A float is encoded as 4 bytes, regardless of nesting.
 */
  __pyx_tuple__201 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unused_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 787, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 787, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__203 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__205 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":795
 * class FloatCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_double(value)
 */
  __pyx_tuple__207 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 795, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 795, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":799
 *     out.write_bigendian_double(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_double()
 */
  __pyx_tuple__209 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 799, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":803
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A double is encoded as 8 bytes, regardless of nesting.
 */
  __pyx_tuple__211 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unused_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 803, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 803, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__213 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);
  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__215 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":825
 *     return value + _TIME_SHIFT
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (IntervalWindow, create_OutputStream, bool) -> None
 *     typed_value = value
 */
  __pyx_tuple__217 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 825, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 825, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":834
 *     out.write_var_int64(span_millis)
 * 
 *   def decode_from_stream(self, in_, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> IntervalWindow
 *     if not TYPE_CHECKING:
 */
  __pyx_tuple__219 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 834, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 834, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":848
 *     return typed_value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 */
  __pyx_tuple__221 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 848, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 848, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__223 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__225 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":866
 *   https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79
 *   """
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Timestamp, create_OutputStream, bool) -> None
 *     millis = value.micros // 1000
 */
  __pyx_tuple__227 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 866, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 866, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":875
 *     out.write_bigendian_int64(millis)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Timestamp
 *     millis = in_stream.read_bigendian_int64()
 */
  __pyx_tuple__229 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 875, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 875, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":884
 *     return Timestamp(micros=millis * 1000)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of
 *     # nesting.
 */
  __pyx_tuple__231 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unused_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 884, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 884, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__233 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__235 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":892
 * class TimerCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, key_coder_impl, window_coder_impl):             # <<<<<<<<<<<<<<
 *     self._timestamp_coder_impl = TimestampCoderImpl()
 *     self._boolean_coder_impl = BooleanCoderImpl()
 */
  __pyx_tuple__237 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_key_coder_impl, __pyx_n_s_window_coder_impl, __pyx_n_s_StrUtf8Coder); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_init, 892, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 892, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":901
 *     self._tag_coder_impl = StrUtf8Coder().get_impl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (userstate.Timer, create_OutputStream, bool) -> None
 *     self._key_coder_impl.encode_to_stream(value.user_key, out, True)
 */
  __pyx_tuple__239 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 901, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 901, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":914
 *       self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> userstate.Timer
 *     from apache_beam.transforms import userstate
 */
  __pyx_tuple__241 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested, __pyx_n_s_userstate, __pyx_n_s_user_key, __pyx_n_s_dynamic_timer_tag, __pyx_n_s_windows, __pyx_n_s_clear_bit); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 914, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 914, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":950
 * 
 *   A coder for int objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_var_int64(value)
 */
  __pyx_tuple__243 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 950, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 950, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":954
 *     out.write_var_int64(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> int
 *     return in_stream.read_var_int64()
 */
  __pyx_tuple__245 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 954, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":958
 *     return in_stream.read_var_int64()
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):
 */
  __pyx_tuple__247 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(0, 958, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":964
 *     return StreamCoderImpl.encode(self, value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 */
  __pyx_tuple__249 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 964, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 964, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":971
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # Note that VarInts are encoded the same way regardless of nesting.
 */
  __pyx_tuple__251 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 971, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(0, 971, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__253 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__255 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);
  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":984
 *     self._value = value
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     pass
 */
  __pyx_tuple__257 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 984, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(0, 984, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":988
 *     pass
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._value
 */
  __pyx_tuple__259 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);
  __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(0, 988, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":992
 *     return self._value
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     b = b''  # avoid byte vs str vs unicode error
 *     return b
 */
  __pyx_tuple__261 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);
  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 992, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(0, 992, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":996
 *     return b
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._value
 * 
 */
  __pyx_tuple__263 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);
  __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 996, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(0, 996, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":999
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return 0
 */
  __pyx_tuple__265 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);
  __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 999, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) __PYX_ERR(0, 999, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__267 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);
  __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__269 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);
  __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1013
 *     self._coder_impls = tuple(coder_impls)
 * 
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_tuple__271 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);
  __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_extract_components, 1013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(0, 1013, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1016
 *     raise NotImplementedError
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_tuple__273 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_components); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);
  __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_components, 1016, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(0, 1016, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1019
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     values = self._extract_components(value)
 */
  __pyx_tuple__275 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);
  __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1019, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(0, 1019, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1029
 *           values[i], out, nested or i + 1 < len(self._coder_impls))
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._construct_from_components([
 */
  __pyx_tuple__277 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);
  __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1029, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(0, 1029, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1037
 *     ])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_tuple__279 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);
  __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 1037, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(0, 1037, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1045
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */
  __pyx_tuple__281 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);
  __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 1045, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(0, 1045, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__283 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);
  __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__285 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);
  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1064
 * class AvroCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema):             # <<<<<<<<<<<<<<
 *     self.parsed_schema = parse_schema(json.loads(schema))
 * 
 */
  __pyx_tuple__287 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);
  __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_init, 1064, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(0, 1064, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1067
 *     self.parsed_schema = parse_schema(json.loads(schema))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert issubclass(type(value), AvroRecord)
 *     with BytesIO() as buf:
 */
  __pyx_tuple__289 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_buf); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__289);
  __Pyx_GIVEREF(__pyx_tuple__289);
  __pyx_codeobj__290 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 1067, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__290)) __PYX_ERR(0, 1067, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1073
 *       return buf.getvalue()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     with BytesIO(encoded) as buf:
 *       return AvroRecord(schemaless_reader(buf, self.parsed_schema))
 */
  __pyx_tuple__291 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_encoded, __pyx_n_s_buf); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__291);
  __Pyx_GIVEREF(__pyx_tuple__291);
  __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 1073, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(0, 1073, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1080
 * class TupleCoderImpl(AbstractComponentCoderImpl):
 *   """A coder for tuple objects."""
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     return tuple(value)
 * 
 */
  __pyx_tuple__293 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);
  __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_extract_components, 1080, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(0, 1080, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1083
 *     return tuple(value)
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */
  __pyx_tuple__295 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_components); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);
  __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_components, 1083, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(0, 1083, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__297 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);
  __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__299 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);
  __pyx_codeobj__300 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__300)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1087
 * 
 * 
 * class _ConcatSequence(object):             # <<<<<<<<<<<<<<
 *   def __init__(self, head, tail):
 *     # type: (Iterable[Any], Iterable[Any]) -> None
 */
  __pyx_tuple__301 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);

  /* "apache_beam/coders/coder_impl.py":1088
 * 
 * class _ConcatSequence(object):
 *   def __init__(self, head, tail):             # <<<<<<<<<<<<<<
 *     # type: (Iterable[Any], Iterable[Any]) -> None
 *     self._head = head
 */
  __pyx_tuple__302 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_head, __pyx_n_s_tail); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);
  __pyx_codeobj__303 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_init, 1088, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__303)) __PYX_ERR(0, 1088, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1093
 *     self._tail = tail
 * 
 *   def __iter__(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Iterator[Any]
 *     for elem in self._head:
 */
  __pyx_tuple__304 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);
  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_iter, 1093, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 1093, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1100
 *       yield elem
 * 
 *   def __eq__(self, other):             # <<<<<<<<<<<<<<
 *     return list(self) == list(other)
 * 
 */
  __pyx_tuple__305 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);
  __pyx_codeobj__306 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_eq, 1100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__306)) __PYX_ERR(0, 1100, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1103
 *     return list(self) == list(other)
 * 
 *   def __hash__(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_tuple__307 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);
  __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_hash, 1103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(0, 1103, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1106
 *     raise NotImplementedError
 * 
 *   def __reduce__(self):             # <<<<<<<<<<<<<<
 *     return list, (list(self), )
 * 
 */
  __pyx_tuple__309 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__309);
  __Pyx_GIVEREF(__pyx_tuple__309);
  __pyx_codeobj__310 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_reduce, 1106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__310)) __PYX_ERR(0, 1106, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1161
 *     self._write_state_threshold = write_state_threshold
 * 
 *   def _construct_from_sequence(self, values):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_tuple__311 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_values); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__311);
  __Pyx_GIVEREF(__pyx_tuple__311);
  __pyx_codeobj__312 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_sequence, 1161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__312)) __PYX_ERR(0, 1161, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1164
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Sequence, create_OutputStream, bool) -> None
 *     # Compatible with Java's IterableLikeCoder.
 */
  __pyx_tuple__313 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);
  __pyx_codeobj__314 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__314)) __PYX_ERR(0, 1164, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1212
 *         out.write_var_int64(0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Sequence
 *     size = in_stream.read_bigendian_int32()
 */
  __pyx_tuple__315 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);
  __pyx_codeobj__316 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__315, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__316)) __PYX_ERR(0, 1212, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1240
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_tuple__317 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);
  __pyx_codeobj__318 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 1240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__318)) __PYX_ERR(0, 1240, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1248
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */
  __pyx_tuple__319 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);
  __pyx_codeobj__320 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 1248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__320)) __PYX_ERR(0, 1248, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__321 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__321);
  __Pyx_GIVEREF(__pyx_tuple__321);
  __pyx_codeobj__322 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__322)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__323 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__323);
  __Pyx_GIVEREF(__pyx_tuple__323);
  __pyx_codeobj__324 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__324)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1280
 * 
 *   A coder for homogeneous tuple objects."""
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */
  __pyx_tuple__325 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_components); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);
  __pyx_codeobj__326 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_sequence, 1280, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__326)) __PYX_ERR(0, 1280, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__327 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__327);
  __Pyx_GIVEREF(__pyx_tuple__327);
  __pyx_codeobj__328 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__328)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__329 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);
  __pyx_codeobj__330 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__330)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__331 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__331);
  __Pyx_GIVEREF(__pyx_tuple__331);
  __pyx_codeobj__332 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__332)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state)
 */
  __pyx_tuple__333 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);
  __pyx_codeobj__334 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__333, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__334)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1324
 *     self._use_abstract_iterable = use_abstract_iterable
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     if self._use_abstract_iterable:
 *       return _AbstractIterable(components)
 */
  __pyx_tuple__335 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_components); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);
  __pyx_codeobj__336 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__335, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_sequence, 1324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__336)) __PYX_ERR(0, 1324, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__337 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);
  __pyx_codeobj__338 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__338)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__339 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);
  __pyx_codeobj__340 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__340)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1335
 * 
 *   A coder for homogeneous list objects."""
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return components if isinstance(components, list) else list(components)
 * 
 */
  __pyx_tuple__341 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_components); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);
  __pyx_codeobj__342 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_sequence, 1335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__342)) __PYX_ERR(0, 1335, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__343 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);
  __pyx_codeobj__344 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__344)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__345 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);
  __pyx_codeobj__346 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__346)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1339
 * 
 * 
 * class PaneInfoEncoding(object):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_tuple__347 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__347);
  __Pyx_GIVEREF(__pyx_tuple__347);

  /* "apache_beam/coders/coder_impl.py":1373
 *       return PaneInfoEncoding.TWO_INDICES
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None
 *     pane_info = value  # cast
 */
  __pyx_tuple__348 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);
  __pyx_codeobj__349 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__349)) __PYX_ERR(0, 1373, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1388
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> windowed_value.PaneInfo
 *     encoded_first_byte = in_stream.read_byte()
 */
  __pyx_tuple__350 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);
  __pyx_codeobj__351 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__351)) __PYX_ERR(0, 1388, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1410
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_tuple__352 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);
  __pyx_codeobj__353 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 1410, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__353)) __PYX_ERR(0, 1410, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__354 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);
  __pyx_codeobj__355 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__355)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__356 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__356)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__356);
  __Pyx_GIVEREF(__pyx_tuple__356);
  __pyx_codeobj__357 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__356, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__357)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1448
 *     self._pane_info_coder = PaneInfoCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (windowed_value.WindowedValue, create_OutputStream, bool) -> None
 *     wv = value  # type cast
 */
  __pyx_tuple__358 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(0, 1448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);
  __pyx_codeobj__359 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__359)) __PYX_ERR(0, 1448, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1469
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> windowed_value.WindowedValue
 *     timestamp = self._to_normal_time(in_stream.read_bigendian_uint64())
 */
  __pyx_tuple__360 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);
  __pyx_codeobj__361 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__360, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__361)) __PYX_ERR(0, 1469, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1495
 *         pane_info)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */
  __pyx_tuple__362 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__362);
  __Pyx_GIVEREF(__pyx_tuple__362);
  __pyx_codeobj__363 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__362, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 1495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__363)) __PYX_ERR(0, 1495, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__364 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);
  __pyx_codeobj__365 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__365)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__366 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__366)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);
  __pyx_codeobj__367 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__366, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__367)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1532
 *         payload, window_coder)
 * 
 *   def _from_proto(self, payload, window_coder):             # <<<<<<<<<<<<<<
 *     windowed_value_coder = WindowedValueCoderImpl(
 *         BytesCoderImpl(), TimestampCoderImpl(), window_coder)
 */
  __pyx_tuple__368 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_payload, __pyx_n_s_window_coder, __pyx_n_s_windowed_value_coder, __pyx_n_s_wv); if (unlikely(!__pyx_tuple__368)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__368);
  __Pyx_GIVEREF(__pyx_tuple__368);
  __pyx_codeobj__369 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__368, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_from_proto, 1532, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__369)) __PYX_ERR(0, 1532, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1538
 *     return wv.timestamp_micros, wv.windows, wv.pane_info
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     wv = value  # type cast
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 */
  __pyx_tuple__370 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);
  __pyx_codeobj__371 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__371)) __PYX_ERR(0, 1538, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1542
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value = self._value_coder.decode_from_stream(in_stream, nested)
 *     return windowed_value.create(
 */
  __pyx_tuple__372 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__372);
  __Pyx_GIVEREF(__pyx_tuple__372);
  __pyx_codeobj__373 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__372, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__373)) __PYX_ERR(0, 1542, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1547
 *         value, self._timestamp, self._windows, self._pane_info)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     if isinstance(value, observable.ObservableMixin):
 */
  __pyx_tuple__374 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__374)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__374);
  __Pyx_GIVEREF(__pyx_tuple__374);
  __pyx_codeobj__375 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__374, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 1547, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__375)) __PYX_ERR(0, 1547, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__376 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__376)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__376);
  __Pyx_GIVEREF(__pyx_tuple__376);
  __pyx_codeobj__377 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__377)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__378 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__378);
  __Pyx_GIVEREF(__pyx_tuple__378);
  __pyx_codeobj__379 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__378, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__379)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1571
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     encoded_value = self._value_coder.encode(value)
 */
  __pyx_tuple__380 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__380)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__380);
  __Pyx_GIVEREF(__pyx_tuple__380);
  __pyx_codeobj__381 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__380, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__381)) __PYX_ERR(0, 1571, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1577
 *     out.write(encoded_value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     value_length = in_stream.read_var_int64()
 */
  __pyx_tuple__382 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__382)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__382);
  __Pyx_GIVEREF(__pyx_tuple__382);
  __pyx_codeobj__383 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__383)) __PYX_ERR(0, 1577, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1582
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     value_size = self._value_coder.estimate_size(value)
 */
  __pyx_tuple__384 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__384);
  __Pyx_GIVEREF(__pyx_tuple__384);
  __pyx_codeobj__385 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 1582, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__385)) __PYX_ERR(0, 1582, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__386 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__386);
  __Pyx_GIVEREF(__pyx_tuple__386);
  __pyx_codeobj__387 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__386, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__387)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__388 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__388);
  __Pyx_GIVEREF(__pyx_tuple__388);
  __pyx_codeobj__389 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__389)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1597
 *       encoded user key
 *   """
 *   def __init__(self, key_coder_impl):             # <<<<<<<<<<<<<<
 *     self._shard_id_coder_impl = BytesCoderImpl()
 *     self._key_coder_impl = key_coder_impl
 */
  __pyx_tuple__390 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key_coder_impl); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);
  __pyx_codeobj__391 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_init, 1597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__391)) __PYX_ERR(0, 1597, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1601
 *     self._key_coder_impl = key_coder_impl
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (ShardedKey, create_OutputStream, bool) -> None
 *     self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True)
 */
  __pyx_tuple__392 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__392)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__392);
  __Pyx_GIVEREF(__pyx_tuple__392);
  __pyx_codeobj__393 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__392, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1601, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__393)) __PYX_ERR(0, 1601, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1606
 *     self._key_coder_impl.encode_to_stream(value.key, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> ShardedKey
 *     shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True)
 */
  __pyx_tuple__394 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested, __pyx_n_s_shard_id_2, __pyx_n_s_key); if (unlikely(!__pyx_tuple__394)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__394);
  __Pyx_GIVEREF(__pyx_tuple__394);
  __pyx_codeobj__395 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__395)) __PYX_ERR(0, 1606, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1612
 *     return ShardedKey(key=key, shard_id=shard_id)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     estimated_size = 0
 */
  __pyx_tuple__396 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested, __pyx_n_s_estimated_size); if (unlikely(!__pyx_tuple__396)) __PYX_ERR(0, 1612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__396);
  __Pyx_GIVEREF(__pyx_tuple__396);
  __pyx_codeobj__397 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 1612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__397)) __PYX_ERR(0, 1612, __pyx_L1_error)
  __pyx_tuple__398 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__398)) __PYX_ERR(0, 1612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__398);
  __Pyx_GIVEREF(__pyx_tuple__398);

  /* "apache_beam/coders/coder_impl.py":1632
 *     encoded window using it's own coder.
 *   """
 *   def __init__(self, window_coder_impl: CoderImpl) -> None:             # <<<<<<<<<<<<<<
 *     self._window_coder_impl = window_coder_impl
 * 
 */
  __pyx_tuple__399 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_window_coder_impl); if (unlikely(!__pyx_tuple__399)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__399);
  __Pyx_GIVEREF(__pyx_tuple__399);
  __pyx_codeobj__400 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__399, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_init, 1632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__400)) __PYX_ERR(0, 1632, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1635
 *     self._window_coder_impl = window_coder_impl
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested)
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)
 */
  __pyx_tuple__401 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__401)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__401);
  __Pyx_GIVEREF(__pyx_tuple__401);
  __pyx_codeobj__402 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__401, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1635, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__402)) __PYX_ERR(0, 1635, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1639
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     TimestampCoderImpl().decode_from_stream(stream, nested)
 *     return self._window_coder_impl.decode_from_stream(stream, nested)
 */
  __pyx_tuple__403 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__403)) __PYX_ERR(0, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__403);
  __Pyx_GIVEREF(__pyx_tuple__403);
  __pyx_codeobj__404 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__403, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__404)) __PYX_ERR(0, 1639, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1643
 *     return self._window_coder_impl.decode_from_stream(stream, nested)
 * 
 *   def estimate_size(self, value: Any, nested: bool = False) -> int:             # <<<<<<<<<<<<<<
 *     estimated_size = 0
 *     estimated_size += TimestampCoderImpl().estimate_size(value)
 */
  __pyx_tuple__405 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested, __pyx_n_s_estimated_size); if (unlikely(!__pyx_tuple__405)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__405);
  __Pyx_GIVEREF(__pyx_tuple__405);
  __pyx_codeobj__406 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__405, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 1643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__406)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __pyx_tuple__407 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__407)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__407);
  __Pyx_GIVEREF(__pyx_tuple__407);

  /* "apache_beam/coders/coder_impl.py":1657
 * 
 *   @classmethod
 *   def register(cls, field_type, coder_impl):             # <<<<<<<<<<<<<<
 *     cls.ROW_ENCODERS[field_type, coder_impl] = cls
 * 
 */
  __pyx_tuple__408 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_field_type, __pyx_n_s_coder_impl); if (unlikely(!__pyx_tuple__408)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__408);
  __Pyx_GIVEREF(__pyx_tuple__408);
  __pyx_codeobj__409 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__408, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_register, 1657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__409)) __PYX_ERR(0, 1657, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1661
 * 
 *   @classmethod
 *   def create(cls, field_type, coder_impl, column):             # <<<<<<<<<<<<<<
 *     global row_coders_registered
 *     if not row_coders_registered:
 */
  __pyx_tuple__410 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_field_type, __pyx_n_s_coder_impl, __pyx_n_s_column, __pyx_n_s_coder_impl_row_encoders); if (unlikely(!__pyx_tuple__410)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__410);
  __Pyx_GIVEREF(__pyx_tuple__410);
  __pyx_codeobj__411 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__410, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_create, 1661, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__411)) __PYX_ERR(0, 1661, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1673
 *                                 GenericRowColumnEncoder)(coder_impl, column)
 * 
 *   def null_flags(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */
  __pyx_tuple__412 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__412)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__412);
  __Pyx_GIVEREF(__pyx_tuple__412);
  __pyx_codeobj__413 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_null_flags, 1673, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__413)) __PYX_ERR(0, 1673, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1682
 *     raise NotImplementedError(type(self))
 * 
 *   def finalize_write(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */
  __pyx_tuple__414 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__414)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__414);
  __Pyx_GIVEREF(__pyx_tuple__414);
  __pyx_codeobj__415 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__414, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_finalize_write, 1682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__415)) __PYX_ERR(0, 1682, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__416 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__416)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__416);
  __Pyx_GIVEREF(__pyx_tuple__416);
  __pyx_codeobj__417 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__417)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state)
 */
  __pyx_tuple__418 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__418);
  __Pyx_GIVEREF(__pyx_tuple__418);
  __pyx_codeobj__419 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__419)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1691
 *     self.column = column
 * 
 *   def null_flags(self):             # <<<<<<<<<<<<<<
 *     # pylint: disable=singleton-comparison
 *     return self.column == None  # This is an array.
 */
  __pyx_tuple__420 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__420)) __PYX_ERR(0, 1691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__420);
  __Pyx_GIVEREF(__pyx_tuple__420);
  __pyx_codeobj__421 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__420, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_null_flags, 1691, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__421)) __PYX_ERR(0, 1691, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1701
 *     self.column[index] = self.coder_impl.decode_from_stream(in_stream, True)
 * 
 *   def finalize_write(self):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_tuple__422 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__422)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__422);
  __Pyx_GIVEREF(__pyx_tuple__422);
  __pyx_codeobj__423 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__422, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_finalize_write, 1701, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__423)) __PYX_ERR(0, 1701, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__424 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__424)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__424);
  __Pyx_GIVEREF(__pyx_tuple__424);
  __pyx_codeobj__425 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__425)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state)
 */
  __pyx_tuple__426 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__426)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__426);
  __Pyx_GIVEREF(__pyx_tuple__426);
  __pyx_codeobj__427 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__427)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1733
 *         field.type.nullable for field in self.schema.fields)
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_var_int64(self.num_fields)
 *     attrs = [getattr(value, name) for name in self.field_names]
 */
  __pyx_tuple__428 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__428)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__428);
  __Pyx_GIVEREF(__pyx_tuple__428);
  __pyx_codeobj__429 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1733, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__429)) __PYX_ERR(0, 1733, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1771
 *       component_coder.encode_to_stream(attr, out, True)
 * 
 *   def _row_column_encoders(self, columns):             # <<<<<<<<<<<<<<
 *     return [
 *         RowColumnEncoder.create(
 */
  __pyx_tuple__430 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_columns, __pyx_n_s_i, __pyx_n_s_name); if (unlikely(!__pyx_tuple__430)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__430);
  __Pyx_GIVEREF(__pyx_tuple__430);
  __pyx_codeobj__431 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_row_column_encoders, 1771, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__431)) __PYX_ERR(0, 1771, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1780
 *     ]
 * 
 *   def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out):             # <<<<<<<<<<<<<<
 *     attrs = self._row_column_encoders(columns)
 *     n = len(next(iter(columns.values())))
 */
  __pyx_tuple__432 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_columns, __pyx_n_s_out); if (unlikely(!__pyx_tuple__432)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__432);
  __Pyx_GIVEREF(__pyx_tuple__432);
  __pyx_codeobj__433 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__432, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_batch_to_stream, 1780, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__433)) __PYX_ERR(0, 1780, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1817
 *           cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     nvals = in_stream.read_var_int64()
 *     null_mask_len = in_stream.read_var_int64()
 */
  __pyx_tuple__434 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__434)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__434);
  __Pyx_GIVEREF(__pyx_tuple__434);
  __pyx_codeobj__435 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__434, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__435)) __PYX_ERR(0, 1817, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1850
 *             [sorted_components[i] for i in self.encoding_positions]))
 * 
 *   def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream):             # <<<<<<<<<<<<<<
 *     attrs = self._row_column_encoders(dest)
 *     n = len(next(iter(dest.values())))
 */
  __pyx_tuple__436 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_dest, __pyx_n_s_in_stream); if (unlikely(!__pyx_tuple__436)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__436);
  __Pyx_GIVEREF(__pyx_tuple__436);
  __pyx_codeobj__437 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_batch_from_stream, 1850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__437)) __PYX_ERR(0, 1850, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__438 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__438)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__438);
  __Pyx_GIVEREF(__pyx_tuple__438);
  __pyx_codeobj__439 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__438, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__439)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__440 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__440)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__440);
  __Pyx_GIVEREF(__pyx_tuple__440);
  __pyx_codeobj__441 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__440, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__441)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1885
 *     self.representation_coder = representation_coder.get_impl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     return self.representation_coder.encode_to_stream(
 *         self.logical_type.to_representation_type(value), out, nested)
 */
  __pyx_tuple__442 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__442)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__442);
  __Pyx_GIVEREF(__pyx_tuple__442);
  __pyx_codeobj__443 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__442, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__443)) __PYX_ERR(0, 1885, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1889
 *         self.logical_type.to_representation_type(value), out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return self.logical_type.to_language_type(
 *         self.representation_coder.decode_from_stream(in_stream, nested))
 */
  __pyx_tuple__444 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__444)) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__444);
  __Pyx_GIVEREF(__pyx_tuple__444);
  __pyx_codeobj__445 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1889, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__445)) __PYX_ERR(0, 1889, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__446 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__446)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__446);
  __Pyx_GIVEREF(__pyx_tuple__446);
  __pyx_codeobj__447 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__446, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__447)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__448 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__448)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__448);
  __Pyx_GIVEREF(__pyx_tuple__448);
  __pyx_codeobj__449 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__448, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__449)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1899
 *   For interoperability with Java SDK, encoding needs to match that of the Java
 *   SDK BigIntegerCoder."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     if value < 0:
 */
  __pyx_tuple__450 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__450)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__450);
  __Pyx_GIVEREF(__pyx_tuple__450);
  __pyx_codeobj__451 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__450, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__451)) __PYX_ERR(0, 1899, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1909
 *     out.write(encoded_value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> int
 *     encoded_value = in_stream.read_all(nested)
 */
  __pyx_tuple__452 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__452)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__452);
  __Pyx_GIVEREF(__pyx_tuple__452);
  __pyx_codeobj__453 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__452, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1909, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__453)) __PYX_ERR(0, 1909, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__454 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__454)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__454);
  __Pyx_GIVEREF(__pyx_tuple__454);
  __pyx_codeobj__455 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__455)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__456 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__456)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__456);
  __Pyx_GIVEREF(__pyx_tuple__456);
  __pyx_codeobj__457 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__457)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1923
 *   BIG_INT_CODER_IMPL = BigIntegerCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (decimal.Decimal, create_OutputStream, bool) -> None
 *     scale = -value.as_tuple().exponent
 */
  __pyx_tuple__458 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__458)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__458);
  __Pyx_GIVEREF(__pyx_tuple__458);
  __pyx_codeobj__459 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__458, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 1923, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__459)) __PYX_ERR(0, 1923, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1930
 *     self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> decimal.Decimal
 *     scale = in_stream.read_var_int64()
 */
  __pyx_tuple__460 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__460);
  __Pyx_GIVEREF(__pyx_tuple__460);
  __pyx_codeobj__461 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 1930, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__461)) __PYX_ERR(0, 1930, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__462 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__462)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__462);
  __Pyx_GIVEREF(__pyx_tuple__462);
  __pyx_codeobj__463 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__463)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__464 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__464)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__464);
  __Pyx_GIVEREF(__pyx_tuple__464);
  __pyx_codeobj__465 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__465)) __PYX_ERR(1, 16, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__466 = 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__466)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__466);
  __Pyx_GIVEREF(__pyx_tuple__466);
  __pyx_codeobj__467 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__467)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__468 = 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__468)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__468);
  __Pyx_GIVEREF(__pyx_tuple__468);
  __pyx_codeobj__469 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SimpleCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__469)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__470 = 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__470)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__470);
  __Pyx_GIVEREF(__pyx_tuple__470);
  __pyx_codeobj__471 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_StreamCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__471)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__472 = 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__472)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__472);
  __Pyx_GIVEREF(__pyx_tuple__472);
  __pyx_codeobj__473 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CallbackCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__473)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__474 = 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__474)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__474);
  __Pyx_GIVEREF(__pyx_tuple__474);
  __pyx_codeobj__475 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FastPrimitivesCod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__475)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__476 = 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__476)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__476);
  __Pyx_GIVEREF(__pyx_tuple__476);
  __pyx_codeobj__477 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__476, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BytesCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__477)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__478 = 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__478)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__478);
  __Pyx_GIVEREF(__pyx_tuple__478);
  __pyx_codeobj__479 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__478, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BooleanCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__479)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__480 = 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__480)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__480);
  __Pyx_GIVEREF(__pyx_tuple__480);
  __pyx_codeobj__481 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__480, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_MapCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__481)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__482 = 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__482)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__482);
  __Pyx_GIVEREF(__pyx_tuple__482);
  __pyx_codeobj__483 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__482, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BigEndianShortCod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__483)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__484 = 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__484)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__484);
  __Pyx_GIVEREF(__pyx_tuple__484);
  __pyx_codeobj__485 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__484, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SinglePrecisionFl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__485)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__486 = 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__486)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__486);
  __Pyx_GIVEREF(__pyx_tuple__486);
  __pyx_codeobj__487 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__486, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FloatCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__487)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__488 = 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__488)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__488);
  __Pyx_GIVEREF(__pyx_tuple__488);
  __pyx_codeobj__489 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__488, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IntervalWindowCod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__489)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__490 = 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__490)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__490);
  __Pyx_GIVEREF(__pyx_tuple__490);
  __pyx_codeobj__491 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__490, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimestampCoderImp, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__491)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__492 = 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__492)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__492);
  __Pyx_GIVEREF(__pyx_tuple__492);
  __pyx_codeobj__493 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__492, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VarIntCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__493)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__494 = 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__494)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__494);
  __Pyx_GIVEREF(__pyx_tuple__494);
  __pyx_codeobj__495 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__494, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SingletonCoderImp, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__495)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__496 = 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__496)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__496);
  __Pyx_GIVEREF(__pyx_tuple__496);
  __pyx_codeobj__497 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractComponent, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__497)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__498 = 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__498)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__498);
  __Pyx_GIVEREF(__pyx_tuple__498);
  __pyx_codeobj__499 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TupleCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__499)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__500 = 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__500)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__500);
  __Pyx_GIVEREF(__pyx_tuple__500);
  __pyx_codeobj__501 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__500, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SequenceCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__501)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__502 = 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__502)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__502);
  __Pyx_GIVEREF(__pyx_tuple__502);
  __pyx_codeobj__503 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__502, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TupleSequenceCode, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__503)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__504 = 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__504)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__504);
  __Pyx_GIVEREF(__pyx_tuple__504);
  __pyx_codeobj__505 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__504, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__AbstractIterable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__505)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__506 = 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__506)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__506);
  __Pyx_GIVEREF(__pyx_tuple__506);
  __pyx_codeobj__507 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__506, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IterableCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__507)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__508 = 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__508)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__508);
  __Pyx_GIVEREF(__pyx_tuple__508);
  __pyx_codeobj__509 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__508, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ListCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__509)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__510 = 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__510)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__510);
  __Pyx_GIVEREF(__pyx_tuple__510);
  __pyx_codeobj__511 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__510, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PaneInfoCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__511)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__512 = 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__512)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__512);
  __Pyx_GIVEREF(__pyx_tuple__512);
  __pyx_codeobj__513 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__512, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_WindowedValueCode, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__513)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__514 = 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__514)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__514);
  __Pyx_GIVEREF(__pyx_tuple__514);
  __pyx_codeobj__515 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__514, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_ParamWindowedValu, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__515)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__516 = 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__516)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__516);
  __Pyx_GIVEREF(__pyx_tuple__516);
  __pyx_codeobj__517 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__516, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LengthPrefixCoder, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__517)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__518 = 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__518)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__518);
  __Pyx_GIVEREF(__pyx_tuple__518);
  __pyx_codeobj__519 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__518, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RowColumnEncoder, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__519)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__520 = 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__520)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__520);
  __Pyx_GIVEREF(__pyx_tuple__520);
  __pyx_codeobj__521 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_GenericRowColumnE, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__521)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__522 = 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__522)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__522);
  __Pyx_GIVEREF(__pyx_tuple__522);
  __pyx_codeobj__523 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__522, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RowCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__523)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__524 = 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__524)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__524);
  __Pyx_GIVEREF(__pyx_tuple__524);
  __pyx_codeobj__525 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__524, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LogicalTypeCoderI, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__525)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__526 = 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__526)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__526);
  __Pyx_GIVEREF(__pyx_tuple__526);
  __pyx_codeobj__527 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__526, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BigIntegerCoderIm, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__527)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__528 = 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__528)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__528);
  __Pyx_GIVEREF(__pyx_tuple__528);
  __pyx_codeobj__529 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__528, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DecimalCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__529)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "View.MemoryView":287
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
 */
  __pyx_tuple__530 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__530)) __PYX_ERR(1, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__530);
  __Pyx_GIVEREF(__pyx_tuple__530);

  /* "View.MemoryView":288
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
 */
  __pyx_tuple__531 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__531)) __PYX_ERR(1, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__531);
  __Pyx_GIVEREF(__pyx_tuple__531);

  /* "View.MemoryView":289
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__532 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__532)) __PYX_ERR(1, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__532);
  __Pyx_GIVEREF(__pyx_tuple__532);

  /* "View.MemoryView":292
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
 */
  __pyx_tuple__533 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__533)) __PYX_ERR(1, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__533);
  __Pyx_GIVEREF(__pyx_tuple__533);

  /* "View.MemoryView":293
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__534 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__534)) __PYX_ERR(1, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__534);
  __Pyx_GIVEREF(__pyx_tuple__534);

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__535 = 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__535)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__535);
  __Pyx_GIVEREF(__pyx_tuple__535);
  __pyx_codeobj__536 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__535, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__536)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  /* AssertionsEnabled.init */
  __Pyx_init_assertions_enabled();

if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_values.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_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_103 = PyInt_FromLong(103); if (unlikely(!__pyx_int_103)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_104 = PyInt_FromLong(104); if (unlikely(!__pyx_int_104)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1000 = PyInt_FromLong(1000); if (unlikely(!__pyx_int_1000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_12345 = PyInt_FromLong(12345L); if (unlikely(!__pyx_int_12345)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_65536 = PyInt_FromLong(65536L); if (unlikely(!__pyx_int_65536)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_772173 = PyInt_FromLong(772173L); if (unlikely(!__pyx_int_772173)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4374576 = PyInt_FromLong(4374576L); if (unlikely(!__pyx_int_4374576)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5753188 = PyInt_FromLong(5753188L); if (unlikely(!__pyx_int_5753188)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10585166 = PyInt_FromLong(10585166L); if (unlikely(!__pyx_int_10585166)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_12649985 = PyInt_FromLong(12649985L); if (unlikely(!__pyx_int_12649985)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_16430586 = PyInt_FromLong(16430586L); if (unlikely(!__pyx_int_16430586)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_17783873 = PyInt_FromLong(17783873L); if (unlikely(!__pyx_int_17783873)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_18374862 = PyInt_FromLong(18374862L); if (unlikely(!__pyx_int_18374862)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_25546916 = PyInt_FromLong(25546916L); if (unlikely(!__pyx_int_25546916)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_36447268 = PyInt_FromLong(36447268L); if (unlikely(!__pyx_int_36447268)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_38623158 = PyInt_FromLong(38623158L); if (unlikely(!__pyx_int_38623158)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_48664042 = PyInt_FromLong(48664042L); if (unlikely(!__pyx_int_48664042)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_51847764 = PyInt_FromLong(51847764L); if (unlikely(!__pyx_int_51847764)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_63293558 = PyInt_FromLong(63293558L); if (unlikely(!__pyx_int_63293558)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_88144501 = PyInt_FromLong(88144501L); if (unlikely(!__pyx_int_88144501)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_90923958 = PyInt_FromLong(90923958L); if (unlikely(!__pyx_int_90923958)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_91790965 = PyInt_FromLong(91790965L); if (unlikely(!__pyx_int_91790965)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_102880368 = PyInt_FromLong(102880368L); if (unlikely(!__pyx_int_102880368)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_107408500 = PyInt_FromLong(107408500L); if (unlikely(!__pyx_int_107408500)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_109055100 = PyInt_FromLong(109055100L); if (unlikely(!__pyx_int_109055100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_112010984 = PyInt_FromLong(112010984L); if (unlikely(!__pyx_int_112010984)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_113116285 = PyInt_FromLong(113116285L); if (unlikely(!__pyx_int_113116285)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_120365723 = PyInt_FromLong(120365723L); if (unlikely(!__pyx_int_120365723)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_125584289 = PyInt_FromLong(125584289L); if (unlikely(!__pyx_int_125584289)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_133669511 = PyInt_FromLong(133669511L); if (unlikely(!__pyx_int_133669511)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_134056825 = PyInt_FromLong(134056825L); if (unlikely(!__pyx_int_134056825)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_140638058 = PyInt_FromLong(140638058L); if (unlikely(!__pyx_int_140638058)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_140927196 = PyInt_FromLong(140927196L); if (unlikely(!__pyx_int_140927196)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_142505101 = PyInt_FromLong(142505101L); if (unlikely(!__pyx_int_142505101)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_157115109 = PyInt_FromLong(157115109L); if (unlikely(!__pyx_int_157115109)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_172633095 = PyInt_FromLong(172633095L); if (unlikely(!__pyx_int_172633095)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_173814568 = PyInt_FromLong(173814568L); if (unlikely(!__pyx_int_173814568)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_190324669 = PyInt_FromLong(190324669L); if (unlikely(!__pyx_int_190324669)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_192480703 = PyInt_FromLong(192480703L); if (unlikely(!__pyx_int_192480703)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_196964917 = PyInt_FromLong(196964917L); if (unlikely(!__pyx_int_196964917)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_206513719 = PyInt_FromLong(206513719L); if (unlikely(!__pyx_int_206513719)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_213871712 = PyInt_FromLong(213871712L); if (unlikely(!__pyx_int_213871712)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_226081823 = PyInt_FromLong(226081823L); if (unlikely(!__pyx_int_226081823)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_228825662 = PyInt_FromLong(228825662L); if (unlikely(!__pyx_int_228825662)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_235957399 = PyInt_FromLong(235957399L); if (unlikely(!__pyx_int_235957399)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_238750788 = PyInt_FromLong(238750788L); if (unlikely(!__pyx_int_238750788)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_239948688 = PyInt_FromLong(239948688L); if (unlikely(!__pyx_int_239948688)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_254493075 = PyInt_FromLong(254493075L); if (unlikely(!__pyx_int_254493075)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_254493288 = PyInt_FromLong(254493288L); if (unlikely(!__pyx_int_254493288)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_256189473 = PyInt_FromLong(256189473L); if (unlikely(!__pyx_int_256189473)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_260527683 = PyInt_FromLong(260527683L); if (unlikely(!__pyx_int_260527683)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_264067927 = PyInt_FromLong(264067927L); if (unlikely(!__pyx_int_264067927)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_9223372036854775807 = PyInt_FromString((char *)"9223372036854775807", 0, 0); if (unlikely(!__pyx_int_9223372036854775807)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_9223372036854775808 = PyInt_FromString((char *)"-9223372036854775808", 0, 0); if (unlikely(!__pyx_int_neg_9223372036854775808)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_11apache_beam_6coders_10coder_impl_loads = Py_None; Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_dumps = Py_None; Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream = Py_None; Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream = Py_None; Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream = Py_None; Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size = Py_None; Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_past_unicode = Py_None; Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_NoneType = Py_None; Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_small_ints = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow = Py_None; Py_INCREF(Py_None);
  __pyx_8genexpr2__pyx_v_11apache_beam_6coders_10coder_impl__ = Py_None; Py_INCREF(Py_None);
  generic = Py_None; Py_INCREF(Py_None);
  strided = Py_None; Py_INCREF(Py_None);
  indirect = Py_None; Py_INCREF(Py_None);
  contiguous = Py_None; Py_INCREF(Py_None);
  indirect_contiguous = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  if (__Pyx_ExportVoidPtr(__pyx_n_s_loads, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_loads, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_dumps, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_dumps, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_create_InputStream, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_create_OutputStream, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_ByteCountingOutputStream, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_get_varint_size, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_past_unicode, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_past_unicode, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_is_compiled, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_is_compiled, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_NoneType, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_NoneType, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_UNKNOWN_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_NONE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_INT_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_FLOAT_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_BOOL_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_BYTES_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_UNICODE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_LIST_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_TUPLE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_DICT_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_SET_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_ITERABLE_LIKE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PROTO_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_DATACLASS_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_NAMED_TUPLE_TYPE, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE, "unsigned char") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_ITERABLE_LIKE_TYPES, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_unpickled_types, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_small_ints, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_small_ints, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_IntervalWindow, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PaneInfoTiming_UNKNOWN, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_PaneInfoEncoding_FIRST, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_TIME_SHIFT, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT, "uint64_t") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_MIN_TIMESTAMP_micros, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros, "int64_t") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_MAX_TIMESTAMP_micros, (void *)&__pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros, "int64_t") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

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

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.encode_nested = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_encode_nested;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.decode_nested = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_decode_nested;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl._get_nested_size = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, int, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl__get_nested_size;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CoderImpl.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_decode_from_stream;
  __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SimpleCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_encode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_decode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_StreamCoderImpl.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StreamCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_encode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_decode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_estimate_size;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_get_estimated_size_and_observables;
  __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CallbackCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_get_estimated_size_and_observables;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.encode_special_deterministic = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_special_deterministic;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.encode_type = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_encode_type;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.decode_type = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_decode_type;
  __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FastPrimitivesCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_MapCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_12MapCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_MapCoderImpl) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MapCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_MapCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_encode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BytesCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_decode;
  __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BytesCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_encode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_decode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BooleanCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_BooleanCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < 0) __PYX_ERR(0, 761, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < 0) __PYX_ERR(0, 761, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BigEndianShortCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < 0) __PYX_ERR(0, 761, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl) < 0) __PYX_ERR(0, 761, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SinglePrecisionFloatCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_FloatCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < 0) __PYX_ERR(0, 793, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < 0) __PYX_ERR(0, 793, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FloatCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < 0) __PYX_ERR(0, 793, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < 0) __PYX_ERR(0, 793, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < 0) __PYX_ERR(0, 858, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < 0) __PYX_ERR(0, 858, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TimestampCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < 0) __PYX_ERR(0, 858, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < 0) __PYX_ERR(0, 858, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_encode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_decode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VarIntCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < 0) __PYX_ERR(0, 946, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.encode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_encode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.decode = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_decode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SingletonCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_get_estimated_size_and_observables;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl._extract_components = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__extract_components;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl._construct_from_components = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl__construct_from_components;
  __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < 0) __PYX_ERR(0, 1004, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < 0) __PYX_ERR(0, 1004, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractComponentCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < 0) __PYX_ERR(0, 1004, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < 0) __PYX_ERR(0, 1004, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl.__pyx_base._extract_components = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__extract_components;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleCoderImpl.__pyx_base._construct_from_components = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_14TupleCoderImpl__construct_from_components;
  __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < 0) __PYX_ERR(0, 1078, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < 0) __PYX_ERR(0, 1078, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TupleCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < 0) __PYX_ERR(0, 1078, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < 0) __PYX_ERR(0, 1078, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_get_estimated_size_and_observables;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_SequenceCoderImpl._construct_from_sequence = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl__construct_from_sequence;
  __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SequenceCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.__pyx_base._construct_from_sequence = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl__construct_from_sequence;
  __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < 0) __PYX_ERR(0, 1276, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < 0) __PYX_ERR(0, 1276, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TupleSequenceCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < 0) __PYX_ERR(0, 1276, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < 0) __PYX_ERR(0, 1276, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractIterable, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable = &__pyx_type_11apache_beam_6coders_10coder_impl__AbstractIterable;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_IterableCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_IterableCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_IterableCoderImpl.__pyx_base._construct_from_sequence = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17IterableCoderImpl__construct_from_sequence;
  __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IterableCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_ListCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_ListCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_ListCoderImpl.__pyx_base._construct_from_sequence = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl *, PyObject *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_13ListCoderImpl__construct_from_sequence;
  __pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl) < 0) __PYX_ERR(0, 1331, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ListCoderImpl) < 0) __PYX_ERR(0, 1331, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ListCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl) < 0) __PYX_ERR(0, 1331, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl) < 0) __PYX_ERR(0, 1331, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_ListCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_estimate_size;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl._to_normal_time = (uint64_t (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, int64_t))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__to_normal_time;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl._from_normal_time = (int64_t (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl *, uint64_t))__pyx_f_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__from_normal_time;
  __pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < 0) __PYX_ERR(0, 813, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < 0) __PYX_ERR(0, 813, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntervalWindowCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < 0) __PYX_ERR(0, 813, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl) < 0) __PYX_ERR(0, 813, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl._choose_encoding = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *, struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo *))__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl__choose_encoding;
  __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < 0) __PYX_ERR(0, 1359, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < 0) __PYX_ERR(0, 1359, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PaneInfoCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < 0) __PYX_ERR(0, 1359, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < 0) __PYX_ERR(0, 1359, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_get_estimated_size_and_observables;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl._to_normal_time = (uint64_t (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, int64_t))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl._from_normal_time = (int64_t (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *, uint64_t))__pyx_f_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__from_normal_time;
  __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_WindowedValueCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.__pyx_base.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.__pyx_base.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.__pyx_base.__pyx_base.__pyx_base.get_estimated_size_and_observables = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_get_estimated_size_and_observables *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_get_estimated_size_and_observables;
  __pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ParamWindowedValueCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl) < 0) __PYX_ERR(0, 1519, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.__pyx_base.__pyx_base.estimate_size = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size *__pyx_optional_args))__pyx_f_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_estimate_size;
  __pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LengthPrefixCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_10coder_impl_RowColumnEncoder;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_RowColumnEncoder.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_RowColumnEncoder.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_decode_from_stream;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < 0) __PYX_ERR(0, 1653, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < 0) __PYX_ERR(0, 1653, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RowColumnEncoder, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < 0) __PYX_ERR(0, 1653, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder) < 0) __PYX_ERR(0, 1653, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder = &__pyx_type_11apache_beam_6coders_10coder_impl_RowColumnEncoder;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = &__pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowColumnEncoder;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.__pyx_base.encode_to_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.__pyx_base.decode_from_stream = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowColumnEncoder *, size_t, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *))__pyx_f_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_decode_from_stream;
  __pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < 0) __PYX_ERR(0, 1686, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < 0) __PYX_ERR(0, 1686, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GenericRowColumnEncoder, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < 0) __PYX_ERR(0, 1686, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder) < 0) __PYX_ERR(0, 1686, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder = &__pyx_type_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.decode_batch_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_decode_batch_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_RowCoderImpl.encode_batch_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_RowCoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_12RowCoderImpl_encode_batch_to_stream;
  __pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl) < 0) __PYX_ERR(0, 1705, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_RowCoderImpl) < 0) __PYX_ERR(0, 1705, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RowCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl) < 0) __PYX_ERR(0, 1705, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl) < 0) __PYX_ERR(0, 1705, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_RowCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_decode_from_stream;
  __pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < 0) __PYX_ERR(0, 1880, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < 0) __PYX_ERR(0, 1880, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogicalTypeCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < 0) __PYX_ERR(0, 1880, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl) < 0) __PYX_ERR(0, 1880, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_decode_from_stream;
  __pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < 0) __PYX_ERR(0, 1894, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < 0) __PYX_ERR(0, 1894, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BigIntegerCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < 0) __PYX_ERR(0, 1894, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl) < 0) __PYX_ERR(0, 1894, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl;
  __pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.__pyx_base.__pyx_base.encode_to_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, PyObject *, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.__pyx_base.__pyx_base.decode_from_stream = (PyObject *(*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *, int, int __pyx_skip_dispatch))__pyx_f_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_decode_from_stream;
  __pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < 0) __PYX_ERR(0, 1915, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < 0) __PYX_ERR(0, 1915, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DecimalCoderImpl, (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < 0) __PYX_ERR(0, 1915, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl) < 0) __PYX_ERR(0, 1915, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_DecimalCoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct__decode_all;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_1__unpickle_type;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__) < 0) __PYX_ERR(0, 1093, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__ = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_2___iter__;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__) < 0) __PYX_ERR(0, 1707, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__ = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_3___init__;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 1717, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_4_genexpr;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(0, 1723, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_5_genexpr;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(0, 1728, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_6_genexpr;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(0, 1731, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr = &__pyx_type_11apache_beam_6coders_10coder_impl___pyx_scope_struct_7_genexpr;
  __pyx_vtabptr_array = &__pyx_vtable_array;
  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type___pyx_array.tp_print = 0;
  #endif
  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_array_type = &__pyx_type___pyx_array;
  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 280, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type___pyx_MemviewEnum.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 280, __pyx_L1_error)
  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 331, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type___pyx_memoryview.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 331, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 331, __pyx_L1_error)
  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 967, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type___pyx_memoryviewslice.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 967, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 967, __pyx_L1_error)
  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_0_29_36(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("apache_beam.coders.stream"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_6coders_6stream_OutputStream = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.coders.stream", "OutputStream", sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_6coders_6stream_OutputStream) __PYX_ERR(4, 21, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_6coders_6stream_OutputStream->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream)) __PYX_ERR(4, 21, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.coders.stream", "ByteCountingOutputStream", sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream) __PYX_ERR(4, 42, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_ByteCountingOutputStream*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_6stream_ByteCountingOutputStream)) __PYX_ERR(4, 42, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_6stream_InputStream = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.coders.stream", "InputStream", sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_6coders_6stream_InputStream) __PYX_ERR(4, 55, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_6coders_6stream_InputStream = (struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_6coders_6stream_InputStream->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_6coders_6stream_InputStream)) __PYX_ERR(4, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "PaneInfo", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value_PaneInfo),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_5utils_14windowed_value_PaneInfo) __PYX_ERR(5, 28, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedValue", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue) __PYX_ERR(5, 37, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(5, 37, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "WindowedBatch", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedBatch),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch) __PYX_ERR(5, 46, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedBatch*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedBatch->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedBatch)) __PYX_ERR(5, 46, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "HomogeneousWindowedBatch", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch) __PYX_ERR(5, 49, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_HomogeneousWindowedBatch)) __PYX_ERR(5, 49, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase = __Pyx_ImportType_0_29_36(__pyx_t_1, "apache_beam.utils.windowed_value", "_IntervalWindowBase", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct __pyx_obj_11apache_beam_5utils_14windowed_value__IntervalWindowBase),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_11apache_beam_5utils_14windowed_value__IntervalWindowBase) __PYX_ERR(5, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportVoidPtr_0_29_36(__pyx_t_1, "Timestamp", (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr_0_29_36(__pyx_t_1, "_BYTE_TO_PANE_INFO", (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value__BYTE_TO_PANE_INFO, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = PyImport_ImportModule("apache_beam.utils.windowed_value"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction_0_29_36(__pyx_t_1, "create", (void (**)(void))&__pyx_f_11apache_beam_5utils_14windowed_value_create, "struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue *(PyObject *, int64_t, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initcoder_impl(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initcoder_impl(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_coder_impl(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_coder_impl(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_coder_impl(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int64_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  long __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  static PyThread_type_lock __pyx_t_14[8];
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'coder_impl' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #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_coder_impl(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("coder_impl", __pyx_methods, __pyx_k_Coder_implementations_The_actual, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_apache_beam__coders__coder_impl) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __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.coders.coder_impl")) {
      if (unlikely(PyDict_SetItemString(modules, "apache_beam.coders.coder_impl", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  if (unlikely(__Pyx_modinit_variable_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_variable_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "apache_beam/coders/coder_impl.py":35
 * # pytype: skip-file
 * 
 * import decimal             # <<<<<<<<<<<<<<
 * import enum
 * import itertools
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_decimal, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_decimal, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":36
 * 
 * import decimal
 * import enum             # <<<<<<<<<<<<<<
 * import itertools
 * import json
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, 0, 0); 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_enum, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":37
 * import decimal
 * import enum
 * import itertools             # <<<<<<<<<<<<<<
 * import json
 * import logging
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_itertools, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":38
 * import enum
 * import itertools
 * import json             # <<<<<<<<<<<<<<
 * import logging
 * import pickle
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_json, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":39
 * import itertools
 * import json
 * import logging             # <<<<<<<<<<<<<<
 * import pickle
 * from io import BytesIO
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":40
 * import json
 * import logging
 * import pickle             # <<<<<<<<<<<<<<
 * from io import BytesIO
 * from typing import TYPE_CHECKING
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pickle, 0, 0); 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_pickle, __pyx_t_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":41
 * import logging
 * import pickle
 * from io import BytesIO             # <<<<<<<<<<<<<<
 * from typing import TYPE_CHECKING
 * from typing import Any
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_BytesIO);
  __Pyx_GIVEREF(__pyx_n_s_BytesIO);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_BytesIO);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_io, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __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_BytesIO); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BytesIO, __pyx_t_1) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":42
 * import pickle
 * from io import BytesIO
 * from typing import TYPE_CHECKING             # <<<<<<<<<<<<<<
 * from typing import Any
 * from typing import Callable
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_TYPE_CHECKING);
  __Pyx_GIVEREF(__pyx_n_s_TYPE_CHECKING);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_TYPE_CHECKING);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TYPE_CHECKING, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":43
 * from io import BytesIO
 * from typing import TYPE_CHECKING
 * from typing import Any             # <<<<<<<<<<<<<<
 * from typing import Callable
 * from typing import Dict
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Any);
  __Pyx_GIVEREF(__pyx_n_s_Any);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Any);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Any, __pyx_t_1) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":44
 * from typing import TYPE_CHECKING
 * from typing import Any
 * from typing import Callable             # <<<<<<<<<<<<<<
 * from typing import Dict
 * from typing import Iterable
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Callable);
  __Pyx_GIVEREF(__pyx_n_s_Callable);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Callable);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Callable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Callable, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":45
 * from typing import Any
 * from typing import Callable
 * from typing import Dict             # <<<<<<<<<<<<<<
 * from typing import Iterable
 * from typing import Iterator
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Dict);
  __Pyx_GIVEREF(__pyx_n_s_Dict);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Dict);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dict, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":46
 * from typing import Callable
 * from typing import Dict
 * from typing import Iterable             # <<<<<<<<<<<<<<
 * from typing import Iterator
 * from typing import List
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Iterable);
  __Pyx_GIVEREF(__pyx_n_s_Iterable);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Iterable);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_2) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":47
 * from typing import Dict
 * from typing import Iterable
 * from typing import Iterator             # <<<<<<<<<<<<<<
 * from typing import List
 * from typing import Optional
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Iterator);
  __Pyx_GIVEREF(__pyx_n_s_Iterator);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Iterator);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Iterator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterator, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":48
 * from typing import Iterable
 * from typing import Iterator
 * from typing import List             # <<<<<<<<<<<<<<
 * from typing import Optional
 * from typing import Sequence
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_List);
  __Pyx_GIVEREF(__pyx_n_s_List);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_List);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_List, __pyx_t_2) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":49
 * from typing import Iterator
 * from typing import List
 * from typing import Optional             # <<<<<<<<<<<<<<
 * from typing import Sequence
 * from typing import Set
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Optional);
  __Pyx_GIVEREF(__pyx_n_s_Optional);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Optional);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Optional); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Optional, __pyx_t_1) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":50
 * from typing import List
 * from typing import Optional
 * from typing import Sequence             # <<<<<<<<<<<<<<
 * from typing import Set
 * from typing import Tuple
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Sequence);
  __Pyx_GIVEREF(__pyx_n_s_Sequence);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Sequence);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Sequence, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":51
 * from typing import Optional
 * from typing import Sequence
 * from typing import Set             # <<<<<<<<<<<<<<
 * from typing import Tuple
 * from typing import Type
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Set);
  __Pyx_GIVEREF(__pyx_n_s_Set);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Set);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Set, __pyx_t_1) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":52
 * from typing import Sequence
 * from typing import Set
 * from typing import Tuple             # <<<<<<<<<<<<<<
 * from typing import Type
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Tuple);
  __Pyx_GIVEREF(__pyx_n_s_Tuple);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Tuple);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Tuple, __pyx_t_2) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":53
 * from typing import Set
 * from typing import Tuple
 * from typing import Type             # <<<<<<<<<<<<<<
 * 
 * import dill
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Type);
  __Pyx_GIVEREF(__pyx_n_s_Type);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Type);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Type, __pyx_t_1) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":55
 * from typing import Type
 * 
 * import dill             # <<<<<<<<<<<<<<
 * import numpy as np
 * from fastavro import parse_schema
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_dill, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dill, __pyx_t_2) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":56
 * 
 * import dill
 * import numpy as np             # <<<<<<<<<<<<<<
 * from fastavro import parse_schema
 * from fastavro import schemaless_reader
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":57
 * import dill
 * import numpy as np
 * from fastavro import parse_schema             # <<<<<<<<<<<<<<
 * from fastavro import schemaless_reader
 * from fastavro import schemaless_writer
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_parse_schema);
  __Pyx_GIVEREF(__pyx_n_s_parse_schema);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_parse_schema);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_fastavro, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_parse_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_schema, __pyx_t_2) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":58
 * import numpy as np
 * from fastavro import parse_schema
 * from fastavro import schemaless_reader             # <<<<<<<<<<<<<<
 * from fastavro import schemaless_writer
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_schemaless_reader);
  __Pyx_GIVEREF(__pyx_n_s_schemaless_reader);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_schemaless_reader);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_fastavro, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_schemaless_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_schemaless_reader, __pyx_t_1) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":59
 * from fastavro import parse_schema
 * from fastavro import schemaless_reader
 * from fastavro import schemaless_writer             # <<<<<<<<<<<<<<
 * 
 * from apache_beam.coders import observable
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_schemaless_writer);
  __Pyx_GIVEREF(__pyx_n_s_schemaless_writer);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_schemaless_writer);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_fastavro, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_schemaless_writer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_schemaless_writer, __pyx_t_2) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":61
 * from fastavro import schemaless_writer
 * 
 * from apache_beam.coders import observable             # <<<<<<<<<<<<<<
 * from apache_beam.coders.avro_record import AvroRecord
 * from apache_beam.typehints.schemas import named_tuple_from_schema
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_observable);
  __Pyx_GIVEREF(__pyx_n_s_observable);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_observable);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_coders, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_observable, __pyx_t_1) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":62
 * 
 * from apache_beam.coders import observable
 * from apache_beam.coders.avro_record import AvroRecord             # <<<<<<<<<<<<<<
 * from apache_beam.typehints.schemas import named_tuple_from_schema
 * from apache_beam.utils import proto_utils
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_AvroRecord);
  __Pyx_GIVEREF(__pyx_n_s_AvroRecord);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_AvroRecord);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_coders_avro_record, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_AvroRecord); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AvroRecord, __pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":63
 * from apache_beam.coders import observable
 * from apache_beam.coders.avro_record import AvroRecord
 * from apache_beam.typehints.schemas import named_tuple_from_schema             # <<<<<<<<<<<<<<
 * from apache_beam.utils import proto_utils
 * from apache_beam.utils import windowed_value
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_named_tuple_from_schema);
  __Pyx_GIVEREF(__pyx_n_s_named_tuple_from_schema);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_named_tuple_from_schema);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_typehints_schemas, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_named_tuple_from_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_named_tuple_from_schema, __pyx_t_1) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":64
 * from apache_beam.coders.avro_record import AvroRecord
 * from apache_beam.typehints.schemas import named_tuple_from_schema
 * from apache_beam.utils import proto_utils             # <<<<<<<<<<<<<<
 * from apache_beam.utils import windowed_value
 * from apache_beam.utils.sharded_key import ShardedKey
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_proto_utils);
  __Pyx_GIVEREF(__pyx_n_s_proto_utils);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_proto_utils);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_proto_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_proto_utils, __pyx_t_2) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":65
 * from apache_beam.typehints.schemas import named_tuple_from_schema
 * from apache_beam.utils import proto_utils
 * from apache_beam.utils import windowed_value             # <<<<<<<<<<<<<<
 * from apache_beam.utils.sharded_key import ShardedKey
 * from apache_beam.utils.timestamp import MAX_TIMESTAMP
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_windowed_value);
  __Pyx_GIVEREF(__pyx_n_s_windowed_value);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_windowed_value);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_utils, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_windowed_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_windowed_value, __pyx_t_1) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":66
 * from apache_beam.utils import proto_utils
 * from apache_beam.utils import windowed_value
 * from apache_beam.utils.sharded_key import ShardedKey             # <<<<<<<<<<<<<<
 * from apache_beam.utils.timestamp import MAX_TIMESTAMP
 * from apache_beam.utils.timestamp import MIN_TIMESTAMP
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_ShardedKey);
  __Pyx_GIVEREF(__pyx_n_s_ShardedKey);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ShardedKey);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_utils_sharded_key, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ShardedKey); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShardedKey, __pyx_t_2) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":67
 * from apache_beam.utils import windowed_value
 * from apache_beam.utils.sharded_key import ShardedKey
 * from apache_beam.utils.timestamp import MAX_TIMESTAMP             # <<<<<<<<<<<<<<
 * from apache_beam.utils.timestamp import MIN_TIMESTAMP
 * from apache_beam.utils.timestamp import Timestamp
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_MAX_TIMESTAMP);
  __Pyx_GIVEREF(__pyx_n_s_MAX_TIMESTAMP);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MAX_TIMESTAMP);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_utils_timestamp, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __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_MAX_TIMESTAMP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_TIMESTAMP, __pyx_t_1) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":68
 * from apache_beam.utils.sharded_key import ShardedKey
 * from apache_beam.utils.timestamp import MAX_TIMESTAMP
 * from apache_beam.utils.timestamp import MIN_TIMESTAMP             # <<<<<<<<<<<<<<
 * from apache_beam.utils.timestamp import Timestamp
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_MIN_TIMESTAMP);
  __Pyx_GIVEREF(__pyx_n_s_MIN_TIMESTAMP);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_MIN_TIMESTAMP);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_utils_timestamp, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __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_MIN_TIMESTAMP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_TIMESTAMP, __pyx_t_2) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":69
 * from apache_beam.utils.timestamp import MAX_TIMESTAMP
 * from apache_beam.utils.timestamp import MIN_TIMESTAMP
 * from apache_beam.utils.timestamp import Timestamp             # <<<<<<<<<<<<<<
 * 
 * try:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Timestamp);
  __Pyx_GIVEREF(__pyx_n_s_Timestamp);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Timestamp);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_apache_beam_utils_timestamp, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timestamp, __pyx_t_1) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":71
 * from apache_beam.utils.timestamp import Timestamp
 * 
 * try:             # <<<<<<<<<<<<<<
 *   import dataclasses
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "apache_beam/coders/coder_impl.py":72
 * 
 * try:
 *   import dataclasses             # <<<<<<<<<<<<<<
 * except ImportError:
 *   dataclasses = None  # type: ignore
 */
      __pyx_t_2 = __Pyx_Import(__pyx_n_s_dataclasses, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_dataclasses, __pyx_t_2) < 0) __PYX_ERR(0, 72, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":71
 * from apache_beam.utils.timestamp import Timestamp
 * 
 * try:             # <<<<<<<<<<<<<<
 *   import dataclasses
 * except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L7_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":73
 * try:
 *   import dataclasses
 * except ImportError:             # <<<<<<<<<<<<<<
 *   dataclasses = None  # type: ignore
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("apache_beam.coders.coder_impl", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 73, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);

      /* "apache_beam/coders/coder_impl.py":74
 *   import dataclasses
 * except ImportError:
 *   dataclasses = None  # type: ignore             # <<<<<<<<<<<<<<
 * 
 * if TYPE_CHECKING:
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_dataclasses, Py_None) < 0) __PYX_ERR(0, 74, __pyx_L4_except_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L3_exception_handled;
    }
    goto __pyx_L4_except_error;
    __pyx_L4_except_error:;

    /* "apache_beam/coders/coder_impl.py":71
 * from apache_beam.utils.timestamp import Timestamp
 * 
 * try:             # <<<<<<<<<<<<<<
 *   import dataclasses
 * except ImportError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L7_try_end:;
  }

  /* "apache_beam/coders/coder_impl.py":76
 *   dataclasses = None  # type: ignore
 * 
 * if TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *   import proto
 *   from apache_beam.transforms import userstate
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_TYPE_CHECKING); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":77
 * 
 * if TYPE_CHECKING:
 *   import proto             # <<<<<<<<<<<<<<
 *   from apache_beam.transforms import userstate
 *   from apache_beam.transforms.window import IntervalWindow
 */
    __pyx_t_7 = __Pyx_Import(__pyx_n_s_proto, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_proto, __pyx_t_7) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":78
 * if TYPE_CHECKING:
 *   import proto
 *   from apache_beam.transforms import userstate             # <<<<<<<<<<<<<<
 *   from apache_beam.transforms.window import IntervalWindow
 * 
 */
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_n_s_userstate);
    __Pyx_GIVEREF(__pyx_n_s_userstate);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_userstate);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_userstate); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_userstate, __pyx_t_7) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":79
 *   import proto
 *   from apache_beam.transforms import userstate
 *   from apache_beam.transforms.window import IntervalWindow             # <<<<<<<<<<<<<<
 * 
 * try:
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_IntervalWindow);
    __Pyx_GIVEREF(__pyx_n_s_IntervalWindow);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_IntervalWindow);
    __pyx_t_7 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_window, __pyx_t_1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 79, __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_IntervalWindow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":76
 *   dataclasses = None  # type: ignore
 * 
 * if TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *   import proto
 *   from apache_beam.transforms import userstate
 */
  }

  /* "apache_beam/coders/coder_impl.py":81
 *   from apache_beam.transforms.window import IntervalWindow
 * 
 * try:             # <<<<<<<<<<<<<<
 *   from . import stream  # pylint: disable=unused-import
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "apache_beam/coders/coder_impl.py":82
 * 
 * try:
 *   from . import stream  # pylint: disable=unused-import             # <<<<<<<<<<<<<<
 * except ImportError:
 *   SLOW_STREAM = True
 */
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 82, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_n_s_stream);
      __Pyx_GIVEREF(__pyx_n_s_stream);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_stream);
      __pyx_t_1 = __Pyx_Import(__pyx_n_s__7, __pyx_t_7, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_stream); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 82, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_stream, __pyx_t_7) < 0) __PYX_ERR(0, 82, __pyx_L11_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":81
 *   from apache_beam.transforms.window import IntervalWindow
 * 
 * try:             # <<<<<<<<<<<<<<
 *   from . import stream  # pylint: disable=unused-import
 * except ImportError:
 */
    }

    /* "apache_beam/coders/coder_impl.py":86
 *   SLOW_STREAM = True
 * else:
 *   SLOW_STREAM = False             # <<<<<<<<<<<<<<
 * 
 * is_compiled = False
 */
    /*else:*/ {
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_SLOW_STREAM, Py_False) < 0) __PYX_ERR(0, 86, __pyx_L13_except_error)
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L16_try_end;
    __pyx_L11_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":83
 * try:
 *   from . import stream  # pylint: disable=unused-import
 * except ImportError:             # <<<<<<<<<<<<<<
 *   SLOW_STREAM = True
 * else:
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("apache_beam.coders.coder_impl", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(0, 83, __pyx_L13_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "apache_beam/coders/coder_impl.py":84
 *   from . import stream  # pylint: disable=unused-import
 * except ImportError:
 *   SLOW_STREAM = True             # <<<<<<<<<<<<<<
 * else:
 *   SLOW_STREAM = False
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_SLOW_STREAM, Py_True) < 0) __PYX_ERR(0, 84, __pyx_L13_except_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L12_exception_handled;
    }
    goto __pyx_L13_except_error;
    __pyx_L13_except_error:;

    /* "apache_beam/coders/coder_impl.py":81
 *   from apache_beam.transforms.window import IntervalWindow
 * 
 * try:             # <<<<<<<<<<<<<<
 *   from . import stream  # pylint: disable=unused-import
 * except ImportError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L12_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    __pyx_L16_try_end:;
  }

  /* "apache_beam/coders/coder_impl.py":88
 *   SLOW_STREAM = False
 * 
 * is_compiled = False             # <<<<<<<<<<<<<<
 * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1
 * 
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled = 0;

  /* "apache_beam/coders/coder_impl.py":89
 * 
 * is_compiled = False
 * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1             # <<<<<<<<<<<<<<
 * 
 * if TYPE_CHECKING or SLOW_STREAM:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_4lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fits_in_64_bits, __pyx_t_2) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":91
 * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1
 * 
 * if TYPE_CHECKING or SLOW_STREAM:             # <<<<<<<<<<<<<<
 *   from .slow_stream import InputStream as create_InputStream
 *   from .slow_stream import OutputStream as create_OutputStream
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_TYPE_CHECKING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_9) {
  } else {
    __pyx_t_8 = __pyx_t_9;
    goto __pyx_L20_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SLOW_STREAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_8 = __pyx_t_9;
  __pyx_L20_bool_binop_done:;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":92
 * 
 * if TYPE_CHECKING or SLOW_STREAM:
 *   from .slow_stream import InputStream as create_InputStream             # <<<<<<<<<<<<<<
 *   from .slow_stream import OutputStream as create_OutputStream
 *   from .slow_stream import ByteCountingOutputStream
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_InputStream);
    __Pyx_GIVEREF(__pyx_n_s_InputStream);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_InputStream);
    __pyx_t_7 = __Pyx_Import(__pyx_n_s_slow_stream, __pyx_t_2, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_InputStream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":93
 * if TYPE_CHECKING or SLOW_STREAM:
 *   from .slow_stream import InputStream as create_InputStream
 *   from .slow_stream import OutputStream as create_OutputStream             # <<<<<<<<<<<<<<
 *   from .slow_stream import ByteCountingOutputStream
 *   from .slow_stream import get_varint_size
 */
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_n_s_OutputStream);
    __Pyx_GIVEREF(__pyx_n_s_OutputStream);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_OutputStream);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_slow_stream, __pyx_t_7, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OutputStream); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":94
 *   from .slow_stream import InputStream as create_InputStream
 *   from .slow_stream import OutputStream as create_OutputStream
 *   from .slow_stream import ByteCountingOutputStream             # <<<<<<<<<<<<<<
 *   from .slow_stream import get_varint_size
 * 
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_ByteCountingOutputStream);
    __Pyx_GIVEREF(__pyx_n_s_ByteCountingOutputStream);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ByteCountingOutputStream);
    __pyx_t_7 = __Pyx_Import(__pyx_n_s_slow_stream, __pyx_t_2, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_ByteCountingOutputStream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":95
 *   from .slow_stream import OutputStream as create_OutputStream
 *   from .slow_stream import ByteCountingOutputStream
 *   from .slow_stream import get_varint_size             # <<<<<<<<<<<<<<
 * 
 *   try:
 */
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_n_s_get_varint_size);
    __Pyx_GIVEREF(__pyx_n_s_get_varint_size);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_get_varint_size);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_slow_stream, __pyx_t_7, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_varint_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":97
 *   from .slow_stream import get_varint_size
 * 
 *   try:             # <<<<<<<<<<<<<<
 *     import cython
 *     is_compiled = cython.compiled
 */
    {
      (void)__pyx_t_3; (void)__pyx_t_4; (void)__pyx_t_5; /* mark used */
      /*try:*/ {

        /* "apache_beam/coders/coder_impl.py":99
 *   try:
 *     import cython
 *     is_compiled = cython.compiled             # <<<<<<<<<<<<<<
 *   except ImportError:
 *     globals()['cython'] = type('fake_cython', (), {'cast': lambda typ, x: x})
 */
        __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled = 1;

        /* "apache_beam/coders/coder_impl.py":97
 *   from .slow_stream import get_varint_size
 * 
 *   try:             # <<<<<<<<<<<<<<
 *     import cython
 *     is_compiled = cython.compiled
 */
      }
    }

    /* "apache_beam/coders/coder_impl.py":91
 * fits_in_64_bits = lambda x: -(1 << 63) <= x <= (1 << 63) - 1
 * 
 * if TYPE_CHECKING or SLOW_STREAM:             # <<<<<<<<<<<<<<
 *   from .slow_stream import InputStream as create_InputStream
 *   from .slow_stream import OutputStream as create_OutputStream
 */
    goto __pyx_L19;
  }

  /* "apache_beam/coders/coder_impl.py":105
 * else:
 *   # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
 *   from .stream import InputStream as create_InputStream             # <<<<<<<<<<<<<<
 *   from .stream import OutputStream as create_OutputStream
 *   from .stream import ByteCountingOutputStream
 */
  /*else*/ {
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_InputStream);
    __Pyx_GIVEREF(__pyx_n_s_InputStream);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_InputStream);
    __pyx_t_7 = __Pyx_Import(__pyx_n_s_stream, __pyx_t_2, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_InputStream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":106
 *   # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
 *   from .stream import InputStream as create_InputStream
 *   from .stream import OutputStream as create_OutputStream             # <<<<<<<<<<<<<<
 *   from .stream import ByteCountingOutputStream
 *   from .stream import get_varint_size
 */
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_n_s_OutputStream);
    __Pyx_GIVEREF(__pyx_n_s_OutputStream);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_OutputStream);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_stream, __pyx_t_7, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OutputStream); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":107
 *   from .stream import InputStream as create_InputStream
 *   from .stream import OutputStream as create_OutputStream
 *   from .stream import ByteCountingOutputStream             # <<<<<<<<<<<<<<
 *   from .stream import get_varint_size
 *   # Make it possible to import create_InputStream and other cdef-classes
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_ByteCountingOutputStream);
    __Pyx_GIVEREF(__pyx_n_s_ByteCountingOutputStream);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ByteCountingOutputStream);
    __pyx_t_7 = __Pyx_Import(__pyx_n_s_stream, __pyx_t_2, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_ByteCountingOutputStream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":108
 *   from .stream import OutputStream as create_OutputStream
 *   from .stream import ByteCountingOutputStream
 *   from .stream import get_varint_size             # <<<<<<<<<<<<<<
 *   # Make it possible to import create_InputStream and other cdef-classes
 *   # from apache_beam.coders.coder_impl when Cython codepath is used.
 */
    __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_n_s_get_varint_size);
    __Pyx_GIVEREF(__pyx_n_s_get_varint_size);
    PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_get_varint_size);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_stream, __pyx_t_7, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_varint_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":111
 *   # Make it possible to import create_InputStream and other cdef-classes
 *   # from apache_beam.coders.coder_impl when Cython codepath is used.
 *   globals()['create_InputStream'] = create_InputStream             # <<<<<<<<<<<<<<
 *   globals()['create_OutputStream'] = create_OutputStream
 *   globals()['ByteCountingOutputStream'] = ByteCountingOutputStream
 */
    __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_u_create_InputStream, __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream) < 0)) __PYX_ERR(0, 111, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":112
 *   # from apache_beam.coders.coder_impl when Cython codepath is used.
 *   globals()['create_InputStream'] = create_InputStream
 *   globals()['create_OutputStream'] = create_OutputStream             # <<<<<<<<<<<<<<
 *   globals()['ByteCountingOutputStream'] = ByteCountingOutputStream
 *   # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
 */
    __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_u_create_OutputStream, __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream) < 0)) __PYX_ERR(0, 112, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":113
 *   globals()['create_InputStream'] = create_InputStream
 *   globals()['create_OutputStream'] = create_OutputStream
 *   globals()['ByteCountingOutputStream'] = ByteCountingOutputStream             # <<<<<<<<<<<<<<
 *   # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
 *   is_compiled = True
 */
    __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_u_ByteCountingOutputStream, __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream) < 0)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":115
 *   globals()['ByteCountingOutputStream'] = ByteCountingOutputStream
 *   # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
 *   is_compiled = True             # <<<<<<<<<<<<<<
 * 
 * _LOGGER = logging.getLogger(__name__)
 */
    __pyx_v_11apache_beam_6coders_10coder_impl_is_compiled = 1;
  }
  __pyx_L19:;

  /* "apache_beam/coders/coder_impl.py":117
 *   is_compiled = True
 * 
 * _LOGGER = logging.getLogger(__name__)             # <<<<<<<<<<<<<<
 * 
 * _TIME_SHIFT = 1 << 63
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __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;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGGER, __pyx_t_1) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":119
 * _LOGGER = logging.getLogger(__name__)
 * 
 * _TIME_SHIFT = 1 << 63             # <<<<<<<<<<<<<<
 * MIN_TIMESTAMP_micros = MIN_TIMESTAMP.micros
 * MAX_TIMESTAMP_micros = MAX_TIMESTAMP.micros
 */
  __pyx_v_11apache_beam_6coders_10coder_impl__TIME_SHIFT = 0x8000000000000000;

  /* "apache_beam/coders/coder_impl.py":120
 * 
 * _TIME_SHIFT = 1 << 63
 * MIN_TIMESTAMP_micros = MIN_TIMESTAMP.micros             # <<<<<<<<<<<<<<
 * MAX_TIMESTAMP_micros = MAX_TIMESTAMP.micros
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_TIMESTAMP); 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_micros); 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_10 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_11apache_beam_6coders_10coder_impl_MIN_TIMESTAMP_micros = __pyx_t_10;

  /* "apache_beam/coders/coder_impl.py":121
 * _TIME_SHIFT = 1 << 63
 * MIN_TIMESTAMP_micros = MIN_TIMESTAMP.micros
 * MAX_TIMESTAMP_micros = MAX_TIMESTAMP.micros             # <<<<<<<<<<<<<<
 * 
 * IterableStateReader = Callable[[bytes, 'CoderImpl'], Iterable]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MAX_TIMESTAMP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_11apache_beam_6coders_10coder_impl_MAX_TIMESTAMP_micros = __pyx_t_10;

  /* "apache_beam/coders/coder_impl.py":123
 * MAX_TIMESTAMP_micros = MAX_TIMESTAMP.micros
 * 
 * IterableStateReader = Callable[[bytes, 'CoderImpl'], Iterable]             # <<<<<<<<<<<<<<
 * IterableStateWriter = Callable[[Iterable, 'CoderImpl'], bytes]
 * Observables = List[Tuple[observable.ObservableMixin, 'CoderImpl']]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Callable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&PyBytes_Type)));
  __Pyx_INCREF(__pyx_n_u_CoderImpl);
  __Pyx_GIVEREF(__pyx_n_u_CoderImpl);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_CoderImpl);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_7);
  __pyx_t_2 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IterableStateReader, __pyx_t_7) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":124
 * 
 * IterableStateReader = Callable[[bytes, 'CoderImpl'], Iterable]
 * IterableStateWriter = Callable[[Iterable, 'CoderImpl'], bytes]             # <<<<<<<<<<<<<<
 * Observables = List[Tuple[observable.ObservableMixin, 'CoderImpl']]
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Callable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_11);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_11);
  __Pyx_INCREF(__pyx_n_u_CoderImpl);
  __Pyx_GIVEREF(__pyx_n_u_CoderImpl);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_CoderImpl);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
  PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)(&PyBytes_Type)));
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IterableStateWriter, __pyx_t_1) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":125
 * IterableStateReader = Callable[[bytes, 'CoderImpl'], Iterable]
 * IterableStateWriter = Callable[[Iterable, 'CoderImpl'], bytes]
 * Observables = List[Tuple[observable.ObservableMixin, 'CoderImpl']]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_List); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_observable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_CoderImpl);
  __Pyx_GIVEREF(__pyx_n_u_CoderImpl);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_u_CoderImpl);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Observables, __pyx_t_7) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":130
 * class CoderImpl(object):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_encode_to_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":136
 *     raise NotImplementedError
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_decode_from_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":142
 *     raise NotImplementedError
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_5encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_7) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":148
 *     raise NotImplementedError
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_7decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_7) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":154
 *     raise NotImplementedError
 * 
 *   def encode_all(self, values):             # <<<<<<<<<<<<<<
 *     # type: (Iterable[Any]) -> bytes
 *     out = create_OutputStream()
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_all, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_encode_all, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_encode_all, __pyx_t_7) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":161
 *     return out.get()
 * 
 *   def decode_all(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Iterator[Any]
 *     input_stream = create_InputStream(encoded)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_all, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_decode_all, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_decode_all, __pyx_t_7) < 0) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":167
 *       yield self.decode_from_stream(input_stream, True)
 * 
 *   def encode_nested(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_14encode_nested, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_encode_nested, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_encode_nested, __pyx_t_7) < 0) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":173
 *     return out.get()
 * 
 *   def decode_nested(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_16decode_nested, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_decode_nested, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_decode_nested, __pyx_t_7) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":177
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_18estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":185
 *     return out.get_count()
 * 
 *   def _get_nested_size(self, inner_size, nested):             # <<<<<<<<<<<<<<
 *     if not nested:
 *       return inner_size
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_20_get_nested_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl__get_nested_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_get_nested_size, __pyx_t_7) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":191
 *     return varint_size + inner_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_22get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_get_estimated_size_and, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_7) < 0) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_24__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_26__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl___setstate_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":216
 * 
 *   Subclass of CoderImpl implementing stream methods using encode/decode."""
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SimpleCoderImpl_encode_to_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl);

  /* "apache_beam/coders/coder_impl.py":222
 *     stream.write(self.encode(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SimpleCoderImpl_decode_from_stre, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SimpleCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SimpleCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15SimpleCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SimpleCoderImpl___setstate_cytho, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl);

  /* "apache_beam/coders/coder_impl.py":233
 * 
 *   Subclass of CoderImpl implementing encode/decode using stream methods."""
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     # type: (Any) -> bytes
 *     out = create_OutputStream()
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_1encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StreamCoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_7) < 0) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl);

  /* "apache_beam/coders/coder_impl.py":239
 *     return out.get()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     # type: (bytes) -> Any
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_3decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StreamCoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_7) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl);

  /* "apache_beam/coders/coder_impl.py":243
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StreamCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StreamCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_StreamCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StreamCoderImpl___setstate_cytho, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl);

  /* "apache_beam/coders/coder_impl.py":265
 *     self._size_estimator = size_estimator or self._default_size_estimator
 * 
 *   def _default_size_estimator(self, value):             # <<<<<<<<<<<<<<
 *     return len(self.encode(value))
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_3_default_size_estimator, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CallbackCoderImpl__default_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_default_size_estimator, __pyx_t_7) < 0) __PYX_ERR(0, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":268
 *     return len(self.encode(value))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     return stream.write(self._encoder(value), nested)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_5encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CallbackCoderImpl_encode_to_stre, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":272
 *     return stream.write(self._encoder(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._decoder(stream.read_all(nested))
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_7decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CallbackCoderImpl_decode_from_st, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":276
 *     return self._decoder(stream.read_all(nested))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return self._encoder(value)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_9encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CallbackCoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_7) < 0) __PYX_ERR(0, 276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":279
 *     return self._encoder(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._decoder(encoded)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_11decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CallbackCoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_7) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":282
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return self._get_nested_size(self._size_estimator(value), nested)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_13estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CallbackCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":286
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     # TODO(robertwb): Remove this once all coders are correct.
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_15get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CallbackCoderImpl_get_estimated, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_7) < 0) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CallbackCoderImpl___reduce_cytho, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_CallbackCoderImpl, (type(self), 0xd79bc1f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_CallbackCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CallbackCoderImpl___setstate_cyt, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":300
 * 
 * 
 * class ProtoCoderImpl(SimpleCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_message_type):
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_ProtoCoderImpl, __pyx_n_s_ProtoCoderImpl, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/coders/coder_impl.py":302
 * class ProtoCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_message_type):             # <<<<<<<<<<<<<<
 *     self.proto_message_type = proto_message_type
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_1__init__, 0, __pyx_n_s_ProtoCoderImpl___init, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":305
 *     self.proto_message_type = proto_message_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializePartialToString()
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_3encode, 0, __pyx_n_s_ProtoCoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_encode, __pyx_t_11) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":308
 *     return value.SerializePartialToString()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)  # This is in effect "ParsePartial".
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14ProtoCoderImpl_5decode, 0, __pyx_n_s_ProtoCoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_decode, __pyx_t_11) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":300
 * 
 * 
 * class ProtoCoderImpl(SimpleCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_message_type):
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProtoCoderImpl, __pyx_t_7, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtoCoderImpl, __pyx_t_11) < 0) __PYX_ERR(0, 300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":314
 * 
 * 
 * class DeterministicProtoCoderImpl(ProtoCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode(self, value):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ProtoCoderImpl); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_n_s_DeterministicProtoCoderImpl, __pyx_n_s_DeterministicProtoCoderImpl, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/coders/coder_impl.py":316
 * class DeterministicProtoCoderImpl(ProtoCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializePartialToString(deterministic=True)
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27DeterministicProtoCoderImpl_1encode, 0, __pyx_n_s_DeterministicProtoCoderImpl_enco, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_encode, __pyx_t_11) < 0) __PYX_ERR(0, 316, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":314
 * 
 * 
 * class DeterministicProtoCoderImpl(ProtoCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode(self, value):
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_DeterministicProtoCoderImpl, __pyx_t_2, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeterministicProtoCoderImpl, __pyx_t_11) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":320
 * 
 * 
 * class ProtoPlusCoderImpl(SimpleCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_plus_type):
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl));
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_n_s_ProtoPlusCoderImpl, __pyx_n_s_ProtoPlusCoderImpl, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/coders/coder_impl.py":322
 * class ProtoPlusCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_plus_type):             # <<<<<<<<<<<<<<
 *     # type: (Type[proto.Message]) -> None
 *     self.proto_plus_type = proto_plus_type
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_1__init__, 0, __pyx_n_s_ProtoPlusCoderImpl___init, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":326
 *     self.proto_plus_type = proto_plus_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value._pb.SerializePartialToString(deterministic=True)
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_3encode, 0, __pyx_n_s_ProtoPlusCoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_encode, __pyx_t_11) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":329
 *     return value._pb.SerializePartialToString(deterministic=True)
 * 
 *   def decode(self, value):             # <<<<<<<<<<<<<<
 *     return self.proto_plus_type.deserialize(value)
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18ProtoPlusCoderImpl_5decode, 0, __pyx_n_s_ProtoPlusCoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_decode, __pyx_t_11) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":320
 * 
 * 
 * class ProtoPlusCoderImpl(SimpleCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, proto_plus_type):
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ProtoPlusCoderImpl, __pyx_t_2, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtoPlusCoderImpl, __pyx_t_11) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":333
 * 
 * 
 * UNKNOWN_TYPE = 0xFF             # <<<<<<<<<<<<<<
 * NONE_TYPE = 0
 * INT_TYPE = 1
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE = 0xFF;

  /* "apache_beam/coders/coder_impl.py":334
 * 
 * UNKNOWN_TYPE = 0xFF
 * NONE_TYPE = 0             # <<<<<<<<<<<<<<
 * INT_TYPE = 1
 * FLOAT_TYPE = 2
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE = 0;

  /* "apache_beam/coders/coder_impl.py":335
 * UNKNOWN_TYPE = 0xFF
 * NONE_TYPE = 0
 * INT_TYPE = 1             # <<<<<<<<<<<<<<
 * FLOAT_TYPE = 2
 * BYTES_TYPE = 3
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE = 1;

  /* "apache_beam/coders/coder_impl.py":336
 * NONE_TYPE = 0
 * INT_TYPE = 1
 * FLOAT_TYPE = 2             # <<<<<<<<<<<<<<
 * BYTES_TYPE = 3
 * UNICODE_TYPE = 4
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE = 2;

  /* "apache_beam/coders/coder_impl.py":337
 * INT_TYPE = 1
 * FLOAT_TYPE = 2
 * BYTES_TYPE = 3             # <<<<<<<<<<<<<<
 * UNICODE_TYPE = 4
 * BOOL_TYPE = 9
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE = 3;

  /* "apache_beam/coders/coder_impl.py":338
 * FLOAT_TYPE = 2
 * BYTES_TYPE = 3
 * UNICODE_TYPE = 4             # <<<<<<<<<<<<<<
 * BOOL_TYPE = 9
 * LIST_TYPE = 5
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE = 4;

  /* "apache_beam/coders/coder_impl.py":339
 * BYTES_TYPE = 3
 * UNICODE_TYPE = 4
 * BOOL_TYPE = 9             # <<<<<<<<<<<<<<
 * LIST_TYPE = 5
 * TUPLE_TYPE = 6
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE = 9;

  /* "apache_beam/coders/coder_impl.py":340
 * UNICODE_TYPE = 4
 * BOOL_TYPE = 9
 * LIST_TYPE = 5             # <<<<<<<<<<<<<<
 * TUPLE_TYPE = 6
 * DICT_TYPE = 7
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE = 5;

  /* "apache_beam/coders/coder_impl.py":341
 * BOOL_TYPE = 9
 * LIST_TYPE = 5
 * TUPLE_TYPE = 6             # <<<<<<<<<<<<<<
 * DICT_TYPE = 7
 * SET_TYPE = 8
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE = 6;

  /* "apache_beam/coders/coder_impl.py":342
 * LIST_TYPE = 5
 * TUPLE_TYPE = 6
 * DICT_TYPE = 7             # <<<<<<<<<<<<<<
 * SET_TYPE = 8
 * ITERABLE_LIKE_TYPE = 10
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE = 7;

  /* "apache_beam/coders/coder_impl.py":343
 * TUPLE_TYPE = 6
 * DICT_TYPE = 7
 * SET_TYPE = 8             # <<<<<<<<<<<<<<
 * ITERABLE_LIKE_TYPE = 10
 * 
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE = 8;

  /* "apache_beam/coders/coder_impl.py":344
 * DICT_TYPE = 7
 * SET_TYPE = 8
 * ITERABLE_LIKE_TYPE = 10             # <<<<<<<<<<<<<<
 * 
 * PROTO_TYPE = 100
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_ITERABLE_LIKE_TYPE = 10;

  /* "apache_beam/coders/coder_impl.py":346
 * ITERABLE_LIKE_TYPE = 10
 * 
 * PROTO_TYPE = 100             # <<<<<<<<<<<<<<
 * DATACLASS_TYPE = 101
 * NAMED_TUPLE_TYPE = 102
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_PROTO_TYPE = 0x64;

  /* "apache_beam/coders/coder_impl.py":347
 * 
 * PROTO_TYPE = 100
 * DATACLASS_TYPE = 101             # <<<<<<<<<<<<<<
 * NAMED_TUPLE_TYPE = 102
 * ENUM_TYPE = 103
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_DATACLASS_TYPE = 0x65;

  /* "apache_beam/coders/coder_impl.py":348
 * PROTO_TYPE = 100
 * DATACLASS_TYPE = 101
 * NAMED_TUPLE_TYPE = 102             # <<<<<<<<<<<<<<
 * ENUM_TYPE = 103
 * NESTED_STATE_TYPE = 104
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_NAMED_TUPLE_TYPE = 0x66;

  /* "apache_beam/coders/coder_impl.py":349
 * DATACLASS_TYPE = 101
 * NAMED_TUPLE_TYPE = 102
 * ENUM_TYPE = 103             # <<<<<<<<<<<<<<
 * NESTED_STATE_TYPE = 104
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENUM_TYPE, __pyx_int_103) < 0) __PYX_ERR(0, 349, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":350
 * NAMED_TUPLE_TYPE = 102
 * ENUM_TYPE = 103
 * NESTED_STATE_TYPE = 104             # <<<<<<<<<<<<<<
 * 
 * # Types that can be encoded as iterables, but are not literally
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NESTED_STATE_TYPE, __pyx_int_104) < 0) __PYX_ERR(0, 350, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":356
 * # through encoding, only the elements. This is particularly useful
 * # for the value list types created in GroupByKey.
 * _ITERABLE_LIKE_TYPES = set()  # type: Set[Type]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES);
  __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl__ITERABLE_LIKE_TYPES, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":369
 * 
 *   @staticmethod
 *   def register_iterable_like_type(t):             # <<<<<<<<<<<<<<
 *     _ITERABLE_LIKE_TYPES.add(t)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3register_iterable_like_type, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastPrimitivesCoderImpl_register, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dict, __pyx_n_s_register_iterable_like_type, __pyx_t_2) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":368
 *     self.warn_deterministic_fallback = True
 * 
 *   @staticmethod             # <<<<<<<<<<<<<<
 *   def register_iterable_like_type(t):
 *     _ITERABLE_LIKE_TYPES.add(t)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl, __pyx_n_s_register_iterable_like_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dict, __pyx_n_s_register_iterable_like_type, __pyx_t_7) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":372
 *     _ITERABLE_LIKE_TYPES.add(t)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 *     if isinstance(value, observable.ObservableMixin):
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastPrimitivesCoderImpl_get_esti, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_7) < 0) __PYX_ERR(0, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":382
 *     return out.get_count(), []
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     t = type(value)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastPrimitivesCoderImpl_encode_t, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":522
 *       raise TypeError(self._deterministic_encoding_error_msg(value))
 * 
 *   def _deterministic_encoding_error_msg(self, value):             # <<<<<<<<<<<<<<
 *     return (
 *         "Unable to deterministically encode '%s' of type '%s', "
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9_deterministic_encoding_error_msg, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastPrimitivesCoderImpl__determi, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dict, __pyx_n_s_deterministic_encoding_error_ms, __pyx_t_7) < 0) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":534
 *     return _unpickle_type(stream.read_all(True))
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     t = stream.read_byte()
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastPrimitivesCoderImpl_decode_f, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastPrimitivesCoderImpl___reduce, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x22c2424, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastPrimitivesCoderImpl___setsta, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":589
 * 
 * 
 * _unpickled_types = {}  # type: Dict[bytes, type]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types);
  __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl__unpickled_types, ((PyObject*)__pyx_t_7));
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":592
 * 
 * 
 * def _unpickle_type(bs):             # <<<<<<<<<<<<<<
 *   t = _unpickled_types.get(bs, None)
 *   if t is None:
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_1_unpickle_type, 0, __pyx_n_s_unpickle_type, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unpickle_type, __pyx_t_7) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":605
 * 
 * 
 * def _unpickle_named_tuple(bs, items):             # <<<<<<<<<<<<<<
 *   return _unpickle_type(bs)(*items)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_3_unpickle_named_tuple, 0, __pyx_n_s_unpickle_named_tuple, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unpickle_named_tuple, __pyx_t_7) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":613
 * 
 *   A coder for bytes/str objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (bytes, create_OutputStream, bool) -> None
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesCoderImpl_encode_to_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":623
 *     out.write(value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> bytes
 *     return in_stream.read_all(nested)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesCoderImpl_decode_from_strea, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":627
 *     return in_stream.read_all(nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert isinstance(value, bytes), (value, type(value))
 *     return value
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_5encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesCoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_7) < 0) __PYX_ERR(0, 627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":631
 *     return value
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return encoded
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_7decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesCoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_7) < 0) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BytesCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14BytesCoderImpl_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BytesCoderImpl___setstate_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":639
 * 
 *   A coder for bool objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_byte(1 if value else 0)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BooleanCoderImpl_encode_to_strea, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl);

  /* "apache_beam/coders/coder_impl.py":642
 *     out.write_byte(1 if value else 0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value = in_stream.read_byte()
 *     if value == 0:
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BooleanCoderImpl_decode_from_str, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl);

  /* "apache_beam/coders/coder_impl.py":650
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return b'\x01' if value else b'\x00'
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_5encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BooleanCoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_7) < 0) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl);

  /* "apache_beam/coders/coder_impl.py":653
 *     return b'\x01' if value else b'\x00'
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     value = ord(encoded)
 *     if value == 0:
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_7decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BooleanCoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_7) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl);

  /* "apache_beam/coders/coder_impl.py":661
 *     raise ValueError("Expected 0 or 1, got %s" % value)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that booleans are encoded the same way regardless of nesting.
 *     return 1
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_9estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BooleanCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BooleanCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BooleanCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BooleanCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16BooleanCoderImpl_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BooleanCoderImpl___setstate_cyth, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BooleanCoderImpl);

  /* "apache_beam/coders/coder_impl.py":688
 *     self._is_deterministic = is_deterministic
 * 
 *   def encode_to_stream(self, dict_value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_bigendian_int32(len(dict_value))
 *     # Note this implementation always uses nested context when encoding keys
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MapCoderImpl_encode_to_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl);

  /* "apache_beam/coders/coder_impl.py":703
 *         self._value_coder.encode_to_stream(value, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     size = in_stream.read_bigendian_int32()
 *     result = {}
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MapCoderImpl_decode_from_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl);

  /* "apache_beam/coders/coder_impl.py":715
 *     return result
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     estimate = 4  # 4 bytes for int32 size prefix
 *     for key, value in unused_value.items():
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_7estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MapCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MapCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_MapCoderImpl, (type(self), 0x00bc84d, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_MapCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12MapCoderImpl_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MapCoderImpl___setstate_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_MapCoderImpl);

  /* "apache_beam/coders/coder_impl.py":723
 * 
 * 
 * class NullableCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_NullableCoderImpl, __pyx_n_s_NullableCoderImpl, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/coders/coder_impl.py":728
 *   A coder for typing.Optional objects."""
 * 
 *   ENCODE_NULL = 0             # <<<<<<<<<<<<<<
 *   ENCODE_PRESENT = 1
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_ENCODE_NULL, __pyx_int_0) < 0) __PYX_ERR(0, 728, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":729
 * 
 *   ENCODE_NULL = 0
 *   ENCODE_PRESENT = 1             # <<<<<<<<<<<<<<
 * 
 *   def __init__(
 */
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_ENCODE_PRESENT, __pyx_int_1) < 0) __PYX_ERR(0, 729, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":731
 *   ENCODE_PRESENT = 1
 * 
 *   def __init__(             # <<<<<<<<<<<<<<
 *       self,
 *       value_coder  # type: CoderImpl
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_1__init__, 0, __pyx_n_s_NullableCoderImpl___init, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":737
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     if value is None:
 *       out.write_byte(self.ENCODE_NULL)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_3encode_to_stream, 0, __pyx_n_s_NullableCoderImpl_encode_to_stre, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_encode_to_stream, __pyx_t_11) < 0) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":744
 *       self._value_coder.encode_to_stream(value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     null_indicator = in_stream.read_byte()
 *     if null_indicator == self.ENCODE_NULL:
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_5decode_from_stream, 0, __pyx_n_s_NullableCoderImpl_decode_from_st, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_decode_from_stream, __pyx_t_11) < 0) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":755
 *           null_indicator)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     return 1 + (
 *         self._value_coder.estimate_size(unused_value)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17NullableCoderImpl_7estimate_size, 0, __pyx_n_s_NullableCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_tuple__186);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_estimate_size, __pyx_t_11) < 0) __PYX_ERR(0, 755, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":723
 * 
 * 
 * class NullableCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NullableCoderImpl, __pyx_t_7, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NullableCoderImpl, __pyx_t_11) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":763
 * class BigEndianShortCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_bigendian_int16(value)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BigEndianShortCoderImpl_encode_t, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl);

  /* "apache_beam/coders/coder_impl.py":767
 *     out.write_bigendian_int16(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_int16()
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BigEndianShortCoderImpl_decode_f, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl);

  /* "apache_beam/coders/coder_impl.py":771
 *     return in_stream.read_bigendian_int16()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A short is encoded as 2 bytes, regardless of nesting.
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BigEndianShortCoderImpl_estimate, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BigEndianShortCoderImpl___reduce, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BigEndianShortCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BigEndianShortCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23BigEndianShortCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BigEndianShortCoderImpl___setsta, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BigEndianShortCoderImpl);

  /* "apache_beam/coders/coder_impl.py":779
 * class SinglePrecisionFloatCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_float(value)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SinglePrecisionFloatCoderImpl_en, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl);

  /* "apache_beam/coders/coder_impl.py":783
 *     out.write_bigendian_float(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_float()
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SinglePrecisionFloatCoderImpl_de, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl);

  /* "apache_beam/coders/coder_impl.py":787
 *     return in_stream.read_bigendian_float()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A float is encoded as 4 bytes, regardless of nesting.
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SinglePrecisionFloatCoderImpl_es, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SinglePrecisionFloatCoderImpl_2, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SinglePrecisionFloatCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SinglePrecisionFloatCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29SinglePrecisionFloatCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SinglePrecisionFloatCoderImpl_3, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SinglePrecisionFloatCoderImpl);

  /* "apache_beam/coders/coder_impl.py":795
 * class FloatCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (float, create_OutputStream, bool) -> None
 *     out.write_bigendian_double(value)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatCoderImpl_encode_to_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl);

  /* "apache_beam/coders/coder_impl.py":799
 *     out.write_bigendian_double(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> float
 *     return in_stream.read_bigendian_double()
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatCoderImpl_decode_from_strea, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl);

  /* "apache_beam/coders/coder_impl.py":803
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # A double is encoded as 8 bytes, regardless of nesting.
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FloatCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatCoderImpl___setstate_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl);

  /* "apache_beam/coders/coder_impl.py":809
 * 
 * 
 * if not TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *   IntervalWindow = None
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_TYPE_CHECKING); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_9 = ((!__pyx_t_8) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":810
 * 
 * if not TYPE_CHECKING:
 *   IntervalWindow = None             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_INCREF(Py_None);
    __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow);
    __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_IntervalWindow, Py_None);
    __Pyx_GIVEREF(Py_None);

    /* "apache_beam/coders/coder_impl.py":809
 * 
 * 
 * if not TYPE_CHECKING:             # <<<<<<<<<<<<<<
 *   IntervalWindow = None
 * 
 */
  }

  /* "apache_beam/coders/coder_impl.py":825
 *     return value + _TIME_SHIFT
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (IntervalWindow, create_OutputStream, bool) -> None
 *     typed_value = value
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntervalWindowCoderImpl_encode_t, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl);

  /* "apache_beam/coders/coder_impl.py":834
 *     out.write_var_int64(span_millis)
 * 
 *   def decode_from_stream(self, in_, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> IntervalWindow
 *     if not TYPE_CHECKING:
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntervalWindowCoderImpl_decode_f, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl);

  /* "apache_beam/coders/coder_impl.py":848
 *     return typed_value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntervalWindowCoderImpl_estimate, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntervalWindowCoderImpl___reduce, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IntervalWindowCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IntervalWindowCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntervalWindowCoderImpl___setsta, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_IntervalWindowCoderImpl);

  /* "apache_beam/coders/coder_impl.py":866
 *   https://github.com/apache/beam/blob/f5029b4f0dfff404310b2ef55e2632bbacc7b04f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/InstantCoder.java#L79
 *   """
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Timestamp, create_OutputStream, bool) -> None
 *     millis = value.micros // 1000
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampCoderImpl_encode_to_str, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl);

  /* "apache_beam/coders/coder_impl.py":875
 *     out.write_bigendian_int64(millis)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Timestamp
 *     millis = in_stream.read_bigendian_int64()
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampCoderImpl_decode_from_s, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl);

  /* "apache_beam/coders/coder_impl.py":884
 *     return Timestamp(micros=millis * 1000)
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A Timestamp is encoded as a 64-bit integer in 8 bytes, regardless of
 *     # nesting.
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 884, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampCoderImpl___reduce_cyth, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TimestampCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18TimestampCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampCoderImpl___setstate_cy, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl);

  /* "apache_beam/coders/coder_impl.py":890
 * 
 * 
 * class TimerCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, key_coder_impl, window_coder_impl):
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_TimerCoderImpl, __pyx_n_s_TimerCoderImpl, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "apache_beam/coders/coder_impl.py":892
 * class TimerCoderImpl(StreamCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, key_coder_impl, window_coder_impl):             # <<<<<<<<<<<<<<
 *     self._timestamp_coder_impl = TimestampCoderImpl()
 *     self._boolean_coder_impl = BooleanCoderImpl()
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_1__init__, 0, __pyx_n_s_TimerCoderImpl___init, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":901
 *     self._tag_coder_impl = StrUtf8Coder().get_impl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (userstate.Timer, create_OutputStream, bool) -> None
 *     self._key_coder_impl.encode_to_stream(value.user_key, out, True)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_3encode_to_stream, 0, __pyx_n_s_TimerCoderImpl_encode_to_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_encode_to_stream, __pyx_t_11) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":914
 *       self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> userstate.Timer
 *     from apache_beam.transforms import userstate
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TimerCoderImpl_5decode_from_stream, 0, __pyx_n_s_TimerCoderImpl_decode_from_strea, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_decode_from_stream, __pyx_t_11) < 0) __PYX_ERR(0, 914, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":890
 * 
 * 
 * class TimerCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, key_coder_impl, window_coder_impl):
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TimerCoderImpl, __pyx_t_7, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimerCoderImpl, __pyx_t_11) < 0) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":943
 * 
 * 
 * small_ints = [chr(_).encode('latin-1') for _ in range(128)]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  { /* enter inner scope */
    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 943, __pyx_L31_error)
    __Pyx_GOTREF(__pyx_t_7);
    for (__pyx_t_12 = 0; __pyx_t_12 < 0x80; __pyx_t_12+=1) {
      __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L31_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_8genexpr2__pyx_v_11apache_beam_6coders_10coder_impl__);
      __Pyx_DECREF_SET(__pyx_8genexpr2__pyx_v_11apache_beam_6coders_10coder_impl__, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_8genexpr2__pyx_v_11apache_beam_6coders_10coder_impl__); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L31_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 943, __pyx_L31_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, __pyx_kp_u_latin_1) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_kp_u_latin_1);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L31_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 943, __pyx_L31_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_GOTREF(__pyx_8genexpr2__pyx_v_11apache_beam_6coders_10coder_impl__);
    __Pyx_DECREF_SET(__pyx_8genexpr2__pyx_v_11apache_beam_6coders_10coder_impl__, Py_None);
    goto __pyx_L34_exit_scope;
    __pyx_L31_error:;
    __Pyx_GOTREF(__pyx_8genexpr2__pyx_v_11apache_beam_6coders_10coder_impl__);
    __Pyx_DECREF_SET(__pyx_8genexpr2__pyx_v_11apache_beam_6coders_10coder_impl__, Py_None);
    goto __pyx_L1_error;
    __pyx_L34_exit_scope:;
  } /* exit inner scope */
  __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints);
  __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_small_ints, ((PyObject*)__pyx_t_7));
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":950
 * 
 *   A coder for int objects."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     out.write_var_int64(value)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VarIntCoderImpl_encode_to_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 950, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "apache_beam/coders/coder_impl.py":954
 *     out.write_var_int64(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> int
 *     return in_stream.read_var_int64()
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VarIntCoderImpl_decode_from_stre, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "apache_beam/coders/coder_impl.py":958
 *     return in_stream.read_var_int64()
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_5encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VarIntCoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__248)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_7) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "apache_beam/coders/coder_impl.py":964
 *     return StreamCoderImpl.encode(self, value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_7decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VarIntCoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_7) < 0) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "apache_beam/coders/coder_impl.py":971
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     # Note that VarInts are encoded the same way regardless of nesting.
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_9estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VarIntCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__252)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VarIntCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__254)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_VarIntCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_VarIntCoderImpl___setstate_cytho, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__256)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "apache_beam/coders/coder_impl.py":984
 *     self._value = value
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     pass
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonCoderImpl_encode_to_str, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "apache_beam/coders/coder_impl.py":988
 *     pass
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._value
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonCoderImpl_decode_from_s, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__260)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "apache_beam/coders/coder_impl.py":992
 *     return self._value
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     b = b''  # avoid byte vs str vs unicode error
 *     return b
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_7encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonCoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__262)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_7) < 0) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "apache_beam/coders/coder_impl.py":996
 *     return b
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._value
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_9decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonCoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_7) < 0) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "apache_beam/coders/coder_impl.py":999
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     return 0
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_11estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__266)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 999, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonCoderImpl___reduce_cyth, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__268)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SingletonCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_18SingletonCoderImpl_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SingletonCoderImpl___setstate_cy, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__270)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1013
 *     self._coder_impls = tuple(coder_impls)
 * 
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_3_extract_components, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractComponentCoderImpl__extr, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_extract_components, __pyx_t_7) < 0) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1016
 *     raise NotImplementedError
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_5_construct_from_components, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractComponentCoderImpl__cons, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__274)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_construct_from_components, __pyx_t_7) < 0) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1019
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     values = self._extract_components(value)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_7encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractComponentCoderImpl_encod, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__276)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_7) < 0) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1029
 *           values[i], out, nested or i + 1 < len(self._coder_impls))
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     return self._construct_from_components([
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_9decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractComponentCoderImpl_decod, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__278)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1037
 *     ])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_11estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractComponentCoderImpl_estim, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__280)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_7) < 0) __PYX_ERR(0, 1037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1045
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_13get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractComponentCoderImpl_get_e, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__282)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_7) < 0) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractComponentCoderImpl___red, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_AbstractComponentCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractComponentCoderImpl___set, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1062
 * 
 * 
 * class AvroCoderImpl(SimpleCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema):
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_7, __pyx_n_s_AvroCoderImpl, __pyx_n_s_AvroCoderImpl, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "apache_beam/coders/coder_impl.py":1064
 * class AvroCoderImpl(SimpleCoderImpl):
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema):             # <<<<<<<<<<<<<<
 *     self.parsed_schema = parse_schema(json.loads(schema))
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_1__init__, 0, __pyx_n_s_AvroCoderImpl___init, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__288)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1067
 *     self.parsed_schema = parse_schema(json.loads(schema))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert issubclass(type(value), AvroRecord)
 *     with BytesIO() as buf:
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_3encode, 0, __pyx_n_s_AvroCoderImpl_encode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__290)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_encode, __pyx_t_1) < 0) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1073
 *       return buf.getvalue()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     with BytesIO(encoded) as buf:
 *       return AvroRecord(schemaless_reader(buf, self.parsed_schema))
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13AvroCoderImpl_5decode, 0, __pyx_n_s_AvroCoderImpl_decode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_decode, __pyx_t_1) < 0) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1062
 * 
 * 
 * class AvroCoderImpl(SimpleCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 *   def __init__(self, schema):
 */
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AvroCoderImpl, __pyx_t_7, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AvroCoderImpl, __pyx_t_1) < 0) __PYX_ERR(0, 1062, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":1080
 * class TupleCoderImpl(AbstractComponentCoderImpl):
 *   """A coder for tuple objects."""
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     return tuple(value)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_1_extract_components, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleCoderImpl__extract_componen, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_dict, __pyx_n_s_extract_components, __pyx_t_7) < 0) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1083
 *     return tuple(value)
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_3_construct_from_components, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleCoderImpl__construct_from_c, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_dict, __pyx_n_s_construct_from_components, __pyx_t_7) < 0) __PYX_ERR(0, 1083, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_14TupleCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleCoderImpl___setstate_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__300)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_7) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1087
 * 
 * 
 * class _ConcatSequence(object):             # <<<<<<<<<<<<<<
 *   def __init__(self, head, tail):
 *     # type: (Iterable[Any], Iterable[Any]) -> None
 */
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__301); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__301, __pyx_n_s_ConcatSequence, __pyx_n_s_ConcatSequence, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/coders/coder_impl.py":1088
 * 
 * class _ConcatSequence(object):
 *   def __init__(self, head, tail):             # <<<<<<<<<<<<<<
 *     # type: (Iterable[Any], Iterable[Any]) -> None
 *     self._head = head
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_1__init__, 0, __pyx_n_s_ConcatSequence___init, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__303)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":1093
 *     self._tail = tail
 * 
 *   def __iter__(self):             # <<<<<<<<<<<<<<
 *     # type: () -> Iterator[Any]
 *     for elem in self._head:
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_3__iter__, 0, __pyx_n_s_ConcatSequence___iter, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_iter, __pyx_t_11) < 0) __PYX_ERR(0, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":1100
 *       yield elem
 * 
 *   def __eq__(self, other):             # <<<<<<<<<<<<<<
 *     return list(self) == list(other)
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_6__eq__, 0, __pyx_n_s_ConcatSequence___eq, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__306)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_eq, __pyx_t_11) < 0) __PYX_ERR(0, 1100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":1103
 *     return list(self) == list(other)
 * 
 *   def __hash__(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_8__hash__, 0, __pyx_n_s_ConcatSequence___hash, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__308)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_hash, __pyx_t_11) < 0) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":1106
 *     raise NotImplementedError
 * 
 *   def __reduce__(self):             # <<<<<<<<<<<<<<
 *     return list, (list(self), )
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15_ConcatSequence_10__reduce__, 0, __pyx_n_s_ConcatSequence___reduce, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__310)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_reduce, __pyx_t_11) < 0) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":1087
 * 
 * 
 * class _ConcatSequence(object):             # <<<<<<<<<<<<<<
 *   def __init__(self, head, tail):
 *     # type: (Iterable[Any], Iterable[Any]) -> None
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ConcatSequence, __pyx_tuple__301, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ConcatSequence, __pyx_t_11) < 0) __PYX_ERR(0, 1087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "apache_beam/coders/coder_impl.py":1110
 * 
 * 
 * FastPrimitivesCoderImpl.register_iterable_like_type(_ConcatSequence)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), __pyx_n_s_register_iterable_like_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ConcatSequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":1147
 * 
 *   # Default buffer size of 64kB of handling iterables of unknown length.
 *   _DEFAULT_BUFFER_SIZE = 64 * 1024             # <<<<<<<<<<<<<<
 * 
 *   def __init__(
 */
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_DEFAULT_BUFFER_SIZE, __pyx_int_65536) < 0) __PYX_ERR(0, 1147, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1161
 *     self._write_state_threshold = write_state_threshold
 * 
 *   def _construct_from_sequence(self, values):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_3_construct_from_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SequenceCoderImpl__construct_fro, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__312)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_construct_from_sequence, __pyx_t_11) < 0) __PYX_ERR(0, 1161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1164
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Sequence, create_OutputStream, bool) -> None
 *     # Compatible with Java's IterableLikeCoder.
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_5encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SequenceCoderImpl_encode_to_stre, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__314)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1212
 *         out.write_var_int64(0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Sequence
 *     size = in_stream.read_bigendian_int32()
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_7decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SequenceCoderImpl_decode_from_st, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__316)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1240
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_9estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SequenceCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__318)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_11) < 0) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1248
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_11get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SequenceCoderImpl_get_estimated, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__320)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_11) < 0) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SequenceCoderImpl___reduce_cytho, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__322)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SequenceCoderImpl___setstate_cyt, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__324)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1280
 * 
 *   A coder for homogeneous tuple objects."""
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_1_construct_from_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleSequenceCoderImpl__construc, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__326)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl->tp_dict, __pyx_n_s_construct_from_sequence, __pyx_t_11) < 0) __PYX_ERR(0, 1280, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleSequenceCoderImpl___reduce, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__328)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22TupleSequenceCoderImpl_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TupleSequenceCoderImpl___setstat, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__330)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17_AbstractIterable_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractIterable___reduce_cytho, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__332)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__AbstractIterable, (type(self), 0xcbf6c60, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__AbstractIterable__set_state(self, __pyx_state)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17_AbstractIterable_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbstractIterable___setstate_cyt, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__334)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable);

  /* "apache_beam/coders/coder_impl.py":1307
 * 
 * 
 * FastPrimitivesCoderImpl.register_iterable_like_type(_AbstractIterable)             # <<<<<<<<<<<<<<
 * 
 * # TODO(https://github.com/apache/beam/issues/21167): Enable using abstract
 */
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl), __pyx_n_s_register_iterable_like_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_11, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl__AbstractIterable)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1311
 * # TODO(https://github.com/apache/beam/issues/21167): Enable using abstract
 * # iterables permanently
 * _iterable_coder_uses_abstract_iterable_by_default = False             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_iterable_coder_uses_abstract_it, Py_False) < 0) __PYX_ERR(0, 1311, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1324
 *     self._use_abstract_iterable = use_abstract_iterable
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     if self._use_abstract_iterable:
 *       return _AbstractIterable(components)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3_construct_from_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IterableCoderImpl__construct_fro, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__336)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl->tp_dict, __pyx_n_s_construct_from_sequence, __pyx_t_2) < 0) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IterableCoderImpl___reduce_cytho, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__338)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x3c5c876, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IterableCoderImpl___setstate_cyt, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__340)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_IterableCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1335
 * 
 *   A coder for homogeneous list objects."""
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return components if isinstance(components, list) else list(components)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_1_construct_from_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListCoderImpl__construct_from_se, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__342)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl->tp_dict, __pyx_n_s_construct_from_sequence, __pyx_t_2) < 0) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__344)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ListCoderImpl, (type(self), 0xb581fbd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ListCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13ListCoderImpl_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListCoderImpl___setstate_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__346)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_ListCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1339
 * 
 * 
 * class PaneInfoEncoding(object):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__347); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__347, __pyx_n_s_PaneInfoEncoding, __pyx_n_s_PaneInfoEncoding, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);

  /* "apache_beam/coders/coder_impl.py":1349
 *   """
 * 
 *   FIRST = 0             # <<<<<<<<<<<<<<
 *   ONE_INDEX = 1
 *   TWO_INDICES = 2
 */
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_FIRST, __pyx_int_0) < 0) __PYX_ERR(0, 1349, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1350
 * 
 *   FIRST = 0
 *   ONE_INDEX = 1             # <<<<<<<<<<<<<<
 *   TWO_INDICES = 2
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_ONE_INDEX, __pyx_int_1) < 0) __PYX_ERR(0, 1350, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1351
 *   FIRST = 0
 *   ONE_INDEX = 1
 *   TWO_INDICES = 2             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_TWO_INDICES, __pyx_int_2) < 0) __PYX_ERR(0, 1351, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1339
 * 
 * 
 * class PaneInfoEncoding(object):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PaneInfoEncoding, __pyx_tuple__347, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PaneInfoEncoding, __pyx_t_7) < 0) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1355
 * 
 * # These are cdef'd to ints to optimized the common case.
 * PaneInfoTiming_UNKNOWN = windowed_value.PaneInfoTiming.UNKNOWN             # <<<<<<<<<<<<<<
 * PaneInfoEncoding_FIRST = PaneInfoEncoding.FIRST
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_windowed_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PaneInfoTiming); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1355, __pyx_L1_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_UNKNOWN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1355, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoTiming_UNKNOWN = __pyx_t_6;

  /* "apache_beam/coders/coder_impl.py":1356
 * # These are cdef'd to ints to optimized the common case.
 * PaneInfoTiming_UNKNOWN = windowed_value.PaneInfoTiming.UNKNOWN
 * PaneInfoEncoding_FIRST = PaneInfoEncoding.FIRST             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FIRST); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1356, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_11apache_beam_6coders_10coder_impl_PaneInfoEncoding_FIRST = __pyx_t_6;

  /* "apache_beam/coders/coder_impl.py":1373
 *       return PaneInfoEncoding.TWO_INDICES
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (windowed_value.PaneInfo, create_OutputStream, bool) -> None
 *     pane_info = value  # cast
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PaneInfoCoderImpl_encode_to_stre, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__349)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1388
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> windowed_value.PaneInfo
 *     encoded_first_byte = in_stream.read_byte()
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PaneInfoCoderImpl_decode_from_st, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__351)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1410
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_5estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PaneInfoCoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__353)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_11) < 0) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PaneInfoCoderImpl___reduce_cytho, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__355)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PaneInfoCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PaneInfoCoderImpl___setstate_cyt, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__357)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1448
 *     self._pane_info_coder = PaneInfoCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (windowed_value.WindowedValue, create_OutputStream, bool) -> None
 *     wv = value  # type cast
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_WindowedValueCoderImpl_encode_to, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__359)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1448, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1469
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> windowed_value.WindowedValue
 *     timestamp = self._to_normal_time(in_stream.read_bigendian_uint64())
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_WindowedValueCoderImpl_decode_fr, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__361)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1495
 *         pane_info)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> Tuple[int, Observables]
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_WindowedValueCoderImpl_get_estim, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__363)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_11) < 0) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_WindowedValueCoderImpl___reduce, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__365)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_WindowedValueCoderImpl, (type(self), 0x7f7a287, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_WindowedValueCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_WindowedValueCoderImpl___setstat, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__367)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1532
 *         payload, window_coder)
 * 
 *   def _from_proto(self, payload, window_coder):             # <<<<<<<<<<<<<<
 *     windowed_value_coder = WindowedValueCoderImpl(
 *         BytesCoderImpl(), TimestampCoderImpl(), window_coder)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_3_from_proto, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ParamWindowedValueCoderImpl__fro, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__369)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_dict, __pyx_n_s_from_proto, __pyx_t_11) < 0) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1538
 *     return wv.timestamp_micros, wv.windows, wv.pane_info
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     wv = value  # type cast
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_5encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ParamWindowedValueCoderImpl_enco, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__371)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1542
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value = self._value_coder.decode_from_stream(in_stream, nested)
 *     return windowed_value.create(
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_7decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ParamWindowedValueCoderImpl_deco, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__373)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1547
 *         value, self._timestamp, self._windows, self._pane_info)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     if isinstance(value, observable.ObservableMixin):
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_9get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ParamWindowedValueCoderImpl_get, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__375)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_11) < 0) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ParamWindowedValueCoderImpl___re, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__377)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_ParamWindowedValueCoderImpl, (type(self), 0x861f76a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27ParamWindowedValueCoderImpl_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ParamWindowedValueCoderImpl___se, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__379)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_ParamWindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1571
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (Any, create_OutputStream, bool) -> None
 *     encoded_value = self._value_coder.encode(value)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LengthPrefixCoderImpl_encode_to, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__381)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1577
 *     out.write(encoded_value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> Any
 *     value_length = in_stream.read_var_int64()
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LengthPrefixCoderImpl_decode_fro, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__383)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1582
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     value_size = self._value_coder.estimate_size(value)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LengthPrefixCoderImpl_estimate_s, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__385)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_11) < 0) __PYX_ERR(0, 1582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LengthPrefixCoderImpl___reduce_c, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__387)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_LengthPrefixCoderImpl, (type(self), 0x5789e75, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_LengthPrefixCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LengthPrefixCoderImpl___setstate, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__389)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_LengthPrefixCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1588
 * 
 * 
 * class ShardedKeyCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_11, __pyx_n_s_ShardedKeyCoderImpl, __pyx_n_s_ShardedKeyCoderImpl, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "apache_beam/coders/coder_impl.py":1597
 *       encoded user key
 *   """
 *   def __init__(self, key_coder_impl):             # <<<<<<<<<<<<<<
 *     self._shard_id_coder_impl = BytesCoderImpl()
 *     self._key_coder_impl = key_coder_impl
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_1__init__, 0, __pyx_n_s_ShardedKeyCoderImpl___init, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__391)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1601
 *     self._key_coder_impl = key_coder_impl
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (ShardedKey, create_OutputStream, bool) -> None
 *     self._shard_id_coder_impl.encode_to_stream(value._shard_id, out, True)
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_3encode_to_stream, 0, __pyx_n_s_ShardedKeyCoderImpl_encode_to_st, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__393)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_encode_to_stream, __pyx_t_1) < 0) __PYX_ERR(0, 1601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1606
 *     self._key_coder_impl.encode_to_stream(value.key, out, True)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> ShardedKey
 *     shard_id = self._shard_id_coder_impl.decode_from_stream(in_stream, True)
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_5decode_from_stream, 0, __pyx_n_s_ShardedKeyCoderImpl_decode_from, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__395)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_decode_from_stream, __pyx_t_1) < 0) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1612
 *     return ShardedKey(key=key, shard_id=shard_id)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # type: (Any, bool) -> int
 *     estimated_size = 0
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19ShardedKeyCoderImpl_7estimate_size, 0, __pyx_n_s_ShardedKeyCoderImpl_estimate_siz, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__397)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__398);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_estimate_size, __pyx_t_1) < 0) __PYX_ERR(0, 1612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1588
 * 
 * 
 * class ShardedKeyCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ShardedKeyCoderImpl, __pyx_t_11, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShardedKeyCoderImpl, __pyx_t_1) < 0) __PYX_ERR(0, 1588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":1622
 * 
 * 
 * class TimestampPrefixingWindowCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_11, __pyx_n_s_TimestampPrefixingWindowCoderImp, __pyx_n_s_TimestampPrefixingWindowCoderImp, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "apache_beam/coders/coder_impl.py":1632
 *     encoded window using it's own coder.
 *   """
 *   def __init__(self, window_coder_impl: CoderImpl) -> None:             # <<<<<<<<<<<<<<
 *     self._window_coder_impl = window_coder_impl
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_window_coder_impl, __pyx_n_u_CoderImpl) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return, Py_None) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_1__init__, 0, __pyx_n_s_TimestampPrefixingWindowCoderImp_2, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__400)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_13, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_13) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "apache_beam/coders/coder_impl.py":1635
 *     self._window_coder_impl = window_coder_impl
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     TimestampCoderImpl().encode_to_stream(value.max_timestamp(), stream, nested)
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)
 */
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_3encode_to_stream, 0, __pyx_n_s_TimestampPrefixingWindowCoderImp_3, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__402)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_encode_to_stream, __pyx_t_13) < 0) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "apache_beam/coders/coder_impl.py":1639
 *     self._window_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     TimestampCoderImpl().decode_from_stream(stream, nested)
 *     return self._window_coder_impl.decode_from_stream(stream, nested)
 */
  __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_5decode_from_stream, 0, __pyx_n_s_TimestampPrefixingWindowCoderImp_4, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__404)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_decode_from_stream, __pyx_t_13) < 0) __PYX_ERR(0, 1639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "apache_beam/coders/coder_impl.py":1643
 *     return self._window_coder_impl.decode_from_stream(stream, nested)
 * 
 *   def estimate_size(self, value: Any, nested: bool = False) -> int:             # <<<<<<<<<<<<<<
 *     estimated_size = 0
 *     estimated_size += TimestampCoderImpl().estimate_size(value)
 */
  __pyx_t_13 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_nested, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 1643, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_return, __pyx_n_u_int) < 0) __PYX_ERR(0, 1643, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33TimestampPrefixingWindowCoderImpl_7estimate_size, 0, __pyx_n_s_TimestampPrefixingWindowCoderImp_5, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__406)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__407);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_estimate_size, __pyx_t_1) < 0) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":1622
 * 
 * 
 * class TimestampPrefixingWindowCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_TimestampPrefixingWindowCoderImp, __pyx_t_11, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TimestampPrefixingWindowCoderImp, __pyx_t_1) < 0) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":1650
 * 
 * 
 * row_coders_registered = False             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_row_coders_registered, Py_False) < 0) __PYX_ERR(0, 1650, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":1654
 * 
 * class RowColumnEncoder:
 *   ROW_ENCODERS = {1: 12345}             # <<<<<<<<<<<<<<
 * 
 *   @classmethod
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_int_1, __pyx_int_12345) < 0) __PYX_ERR(0, 1654, __pyx_L1_error)
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dict, __pyx_n_s_ROW_ENCODERS, __pyx_t_11) < 0) __PYX_ERR(0, 1654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder);

  /* "apache_beam/coders/coder_impl.py":1657
 * 
 *   @classmethod
 *   def register(cls, field_type, coder_impl):             # <<<<<<<<<<<<<<
 *     cls.ROW_ENCODERS[field_type, coder_impl] = cls
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_1register, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowColumnEncoder_register, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__409)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dict, __pyx_n_s_register, __pyx_t_11) < 0) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder);

  /* "apache_beam/coders/coder_impl.py":1656
 *   ROW_ENCODERS = {1: 12345}
 * 
 *   @classmethod             # <<<<<<<<<<<<<<
 *   def register(cls, field_type, coder_impl):
 *     cls.ROW_ENCODERS[field_type, coder_impl] = cls
 */
  __Pyx_GetNameInClass(__pyx_t_11, (PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_n_s_register); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dict, __pyx_n_s_register, __pyx_t_2) < 0) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder);

  /* "apache_beam/coders/coder_impl.py":1661
 * 
 *   @classmethod
 *   def create(cls, field_type, coder_impl, column):             # <<<<<<<<<<<<<<
 *     global row_coders_registered
 *     if not row_coders_registered:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_3create, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowColumnEncoder_create, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__411)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dict, __pyx_n_s_create, __pyx_t_2) < 0) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder);

  /* "apache_beam/coders/coder_impl.py":1660
 *     cls.ROW_ENCODERS[field_type, coder_impl] = cls
 * 
 *   @classmethod             # <<<<<<<<<<<<<<
 *   def create(cls, field_type, coder_impl, column):
 *     global row_coders_registered
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder, __pyx_n_s_create); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dict, __pyx_n_s_create, __pyx_t_11) < 0) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder);

  /* "apache_beam/coders/coder_impl.py":1673
 *                                 GenericRowColumnEncoder)(coder_impl, column)
 * 
 *   def null_flags(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_5null_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowColumnEncoder_null_flags, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__413)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dict, __pyx_n_s_null_flags, __pyx_t_11) < 0) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder);

  /* "apache_beam/coders/coder_impl.py":1682
 *     raise NotImplementedError(type(self))
 * 
 *   def finalize_write(self):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError(type(self))
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_7finalize_write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowColumnEncoder_finalize_write, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__415)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dict, __pyx_n_s_finalize_write, __pyx_t_11) < 0) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowColumnEncoder___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__417)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowColumnEncoder, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowColumnEncoder__set_state(self, __pyx_state)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16RowColumnEncoder_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowColumnEncoder___setstate_cyth, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__419)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowColumnEncoder);

  /* "apache_beam/coders/coder_impl.py":1691
 *     self.column = column
 * 
 *   def null_flags(self):             # <<<<<<<<<<<<<<
 *     # pylint: disable=singleton-comparison
 *     return self.column == None  # This is an array.
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_3null_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GenericRowColumnEncoder_null_fla, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__421)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder->tp_dict, __pyx_n_s_null_flags, __pyx_t_11) < 0) __PYX_ERR(0, 1691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder);

  /* "apache_beam/coders/coder_impl.py":1701
 *     self.column[index] = self.coder_impl.decode_from_stream(in_stream, True)
 * 
 *   def finalize_write(self):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_5finalize_write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GenericRowColumnEncoder_finalize, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__423)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder->tp_dict, __pyx_n_s_finalize_write, __pyx_t_11) < 0) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GenericRowColumnEncoder___reduce, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__425)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_GenericRowColumnEncoder, (type(self), 0xf452421, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_GenericRowColumnEncoder__set_state(self, __pyx_state)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23GenericRowColumnEncoder_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_GenericRowColumnEncoder___setsta, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__427)); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_GenericRowColumnEncoder);

  /* "apache_beam/coders/coder_impl.py":1733
 *         field.type.nullable for field in self.schema.fields)
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_var_int64(self.num_fields)
 *     attrs = [getattr(value, name) for name in self.field_names]
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowCoderImpl_encode_to_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__429)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_11) < 0) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1771
 *       component_coder.encode_to_stream(attr, out, True)
 * 
 *   def _row_column_encoders(self, columns):             # <<<<<<<<<<<<<<
 *     return [
 *         RowColumnEncoder.create(
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_5_row_column_encoders, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowCoderImpl__row_column_encoder, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__431)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_dict, __pyx_n_s_row_column_encoders, __pyx_t_11) < 0) __PYX_ERR(0, 1771, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1780
 *     ]
 * 
 *   def encode_batch_to_stream(self, columns: Dict[str, np.ndarray], out):             # <<<<<<<<<<<<<<
 *     attrs = self._row_column_encoders(columns)
 *     n = len(next(iter(columns.values())))
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_columns, __pyx_t_1) < 0) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_7encode_batch_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowCoderImpl_encode_batch_to_str, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__433)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_11);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_dict, __pyx_n_s_encode_batch_to_stream, __pyx_t_1) < 0) __PYX_ERR(0, 1780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1817
 *           cython.cast(RowColumnEncoder, attrs[i]).encode_to_stream(k, out)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     nvals = in_stream.read_var_int64()
 *     null_mask_len = in_stream.read_var_int64()
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_9decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowCoderImpl_decode_from_stream, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__435)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_1) < 0) __PYX_ERR(0, 1817, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1850
 *             [sorted_components[i] for i in self.encoding_positions]))
 * 
 *   def decode_batch_from_stream(self, dest: Dict[str, np.ndarray], in_stream):             # <<<<<<<<<<<<<<
 *     attrs = self._row_column_encoders(dest)
 *     n = len(next(iter(dest.values())))
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Dict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&PyUnicode_Type)));
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dest, __pyx_t_2) < 0) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_11decode_batch_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowCoderImpl_decode_batch_from_s, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__437)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_dict, __pyx_n_s_decode_batch_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__439)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_RowCoderImpl, (type(self), 0x0c10601, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_RowCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_12RowCoderImpl_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RowCoderImpl___setstate_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__441)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_RowCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1885
 *     self.representation_coder = representation_coder.get_impl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     return self.representation_coder.encode_to_stream(
 *         self.logical_type.to_representation_type(value), out, nested)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LogicalTypeCoderImpl_encode_to_s, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__443)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1889
 *         self.logical_type.to_representation_type(value), out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return self.logical_type.to_language_type(
 *         self.representation_coder.decode_from_stream(in_stream, nested))
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LogicalTypeCoderImpl_decode_from, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__445)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LogicalTypeCoderImpl___reduce_cy, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__447)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_LogicalTypeCoderImpl, (type(self), 0x10f5c41, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_LogicalTypeCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_20LogicalTypeCoderImpl_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LogicalTypeCoderImpl___setstate, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__449)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_LogicalTypeCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1899
 *   For interoperability with Java SDK, encoding needs to match that of the Java
 *   SDK BigIntegerCoder."""
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (int, create_OutputStream, bool) -> None
 *     if value < 0:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BigIntegerCoderImpl_encode_to_st, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__451)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1909
 *     out.write(encoded_value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> int
 *     encoded_value = in_stream.read_all(nested)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BigIntegerCoderImpl_decode_from, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__453)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BigIntegerCoderImpl___reduce_cyt, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__455)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_BigIntegerCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_BigIntegerCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19BigIntegerCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BigIntegerCoderImpl___setstate_c, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__457)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1921
 *   SDK BigDecimalCoder."""
 * 
 *   BIG_INT_CODER_IMPL = BigIntegerCoderImpl()             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BigIntegerCoderImpl)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl->tp_dict, __pyx_n_s_BIG_INT_CODER_IMPL, __pyx_t_2) < 0) __PYX_ERR(0, 1921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1923
 *   BIG_INT_CODER_IMPL = BigIntegerCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # type: (decimal.Decimal, create_OutputStream, bool) -> None
 *     scale = -value.as_tuple().exponent
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_1encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DecimalCoderImpl_encode_to_strea, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__459)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl);

  /* "apache_beam/coders/coder_impl.py":1930
 *     self.BIG_INT_CODER_IMPL.encode_to_stream(int_value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     # type: (create_InputStream, bool) -> decimal.Decimal
 *     scale = in_stream.read_var_int64()
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_3decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DecimalCoderImpl_decode_from_str, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__461)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 1930, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DecimalCoderImpl___reduce_cython, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__463)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl->tp_dict, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_DecimalCoderImpl, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DecimalCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_16DecimalCoderImpl_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DecimalCoderImpl___setstate_cyth, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__465)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl->tp_dict, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DecimalCoderImpl);

  /* "(tree fragment)":1
 * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_7__pyx_unpickle_CoderImpl, 0, __pyx_n_s_pyx_unpickle_CoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__467)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_CoderImpl__set_state(<CoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_CoderImpl__set_state(CoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_SimpleCoderImpl, 0, __pyx_n_s_pyx_unpickle_SimpleCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__469)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SimpleCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_11__pyx_unpickle_StreamCoderImpl, 0, __pyx_n_s_pyx_unpickle_StreamCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__471)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_StreamCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_StreamCoderImpl__set_state(<StreamCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_StreamCoderImpl__set_state(StreamCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13__pyx_unpickle_CallbackCoderImpl, 0, __pyx_n_s_pyx_unpickle_CallbackCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__473)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CallbackCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_FastPrimitivesCoderImpl, 0, __pyx_n_s_pyx_unpickle_FastPrimitivesCod, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__475)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FastPrimitivesCod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_FastPrimitivesCoderImpl__set_state(<FastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.fallback_coder_impl = __pyx_state[0]; __pyx_result.iterable_coder_impl = __pyx_state[1]; __pyx_result.requires_deterministic_step_label = __pyx_state[2]; __pyx_result.warn_deterministic_fallback = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_BytesCoderImpl, 0, __pyx_n_s_pyx_unpickle_BytesCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__477)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BytesCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BooleanCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_BooleanCoderImpl, 0, __pyx_n_s_pyx_unpickle_BooleanCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__479)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BooleanCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_BooleanCoderImpl__set_state(<BooleanCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BooleanCoderImpl__set_state(BooleanCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_MapCoderImpl, 0, __pyx_n_s_pyx_unpickle_MapCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__481)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_MapCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BigEndianShortCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_BigEndianShortCoderImpl, 0, __pyx_n_s_pyx_unpickle_BigEndianShortCod, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__483)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BigEndianShortCod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_BigEndianShortCoderImpl__set_state(<BigEndianShortCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BigEndianShortCoderImpl__set_state(BigEndianShortCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_SinglePrecisionFloatCoderImpl, 0, __pyx_n_s_pyx_unpickle_SinglePrecisionFl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__485)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SinglePrecisionFl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_FloatCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_FloatCoderImpl, 0, __pyx_n_s_pyx_unpickle_FloatCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__487)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FloatCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_FloatCoderImpl__set_state(<FloatCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_FloatCoderImpl__set_state(FloatCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_IntervalWindowCoderImpl, 0, __pyx_n_s_pyx_unpickle_IntervalWindowCod, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__489)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IntervalWindowCod, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_TimestampCoderImpl, 0, __pyx_n_s_pyx_unpickle_TimestampCoderImp, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__491)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimestampCoderImp, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TimestampCoderImpl__set_state(<TimestampCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TimestampCoderImpl__set_state(TimestampCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.timestamp_class = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_VarIntCoderImpl, 0, __pyx_n_s_pyx_unpickle_VarIntCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__493)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VarIntCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SingletonCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_SingletonCoderImpl, 0, __pyx_n_s_pyx_unpickle_SingletonCoderImp, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__495)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SingletonCoderImp, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_SingletonCoderImpl__set_state(<SingletonCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_SingletonCoderImpl__set_state(SingletonCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._value = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_37__pyx_unpickle_AbstractComponentCoderImpl, 0, __pyx_n_s_pyx_unpickle_AbstractComponent, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__497)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractComponent, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TupleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_39__pyx_unpickle_TupleCoderImpl, 0, __pyx_n_s_pyx_unpickle_TupleCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__499)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TupleCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TupleCoderImpl__set_state(<TupleCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleCoderImpl__set_state(TupleCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._coder_impls = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_41__pyx_unpickle_SequenceCoderImpl, 0, __pyx_n_s_pyx_unpickle_SequenceCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__501)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SequenceCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TupleSequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_43__pyx_unpickle_TupleSequenceCoderImpl, 0, __pyx_n_s_pyx_unpickle_TupleSequenceCode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__503)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TupleSequenceCode, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_TupleSequenceCoderImpl__set_state(<TupleSequenceCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._write_state = __pyx_state[2]; __pyx_result._write_state_threshold = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_45__pyx_unpickle__AbstractIterable, 0, __pyx_n_s_pyx_unpickle__AbstractIterable, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__505)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__AbstractIterable, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_IterableCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_47__pyx_unpickle_IterableCoderImpl, 0, __pyx_n_s_pyx_unpickle_IterableCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__507)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IterableCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_IterableCoderImpl__set_state(<IterableCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._elem_coder = __pyx_state[0]; __pyx_result._read_state = __pyx_state[1]; __pyx_result._use_abstract_iterable = __pyx_state[2]; __pyx_result._write_state = __pyx_state[3]; __pyx_result._write_state_threshold = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_49__pyx_unpickle_ListCoderImpl, 0, __pyx_n_s_pyx_unpickle_ListCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__509)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ListCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_51__pyx_unpickle_PaneInfoCoderImpl, 0, __pyx_n_s_pyx_unpickle_PaneInfoCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__511)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PaneInfoCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_PaneInfoCoderImpl__set_state(<PaneInfoCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PaneInfoCoderImpl__set_state(PaneInfoCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_53__pyx_unpickle_WindowedValueCoderImpl, 0, __pyx_n_s_pyx_unpickle_WindowedValueCode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__513)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_WindowedValueCode, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_ParamWindowedValueCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_55__pyx_unpickle_ParamWindowedValueCoderImpl, 0, __pyx_n_s_pyx_unpickle_ParamWindowedValu, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__515)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_ParamWindowedValu, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(<ParamWindowedValueCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_ParamWindowedValueCoderImpl__set_state(ParamWindowedValueCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._pane_info = __pyx_state[0]; __pyx_result._pane_info_coder = __pyx_state[1]; __pyx_result._timestamp = __pyx_state[2]; __pyx_result._timestamp_coder = __pyx_state[3]; __pyx_result._value_coder = __pyx_state[4]; __pyx_result._windows = __pyx_state[5]; __pyx_result._windows_coder = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_57__pyx_unpickle_LengthPrefixCoderImpl, 0, __pyx_n_s_pyx_unpickle_LengthPrefixCoder, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__517)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LengthPrefixCoder, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_RowColumnEncoder(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_59__pyx_unpickle_RowColumnEncoder, 0, __pyx_n_s_pyx_unpickle_RowColumnEncoder, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__519)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RowColumnEncoder, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_RowColumnEncoder__set_state(<RowColumnEncoder> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowColumnEncoder__set_state(RowColumnEncoder __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_61__pyx_unpickle_GenericRowColumnEncoder, 0, __pyx_n_s_pyx_unpickle_GenericRowColumnE, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__521)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_GenericRowColumnE, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_RowCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_63__pyx_unpickle_RowCoderImpl, 0, __pyx_n_s_pyx_unpickle_RowCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__523)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RowCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_RowCoderImpl__set_state(<RowCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_RowCoderImpl__set_state(RowCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.components = __pyx_state[0]; __pyx_result.constructor = __pyx_state[1]; __pyx_result.encoding_positions = __pyx_state[2]; __pyx_result.encoding_positions_are_trivial = __pyx_state[3]; __pyx_result.encoding_positions_argsort = __pyx_state[4]; __pyx_result.field_names = __pyx_state[5]; __pyx_result.field_nullable = __pyx_state[6]; __pyx_result.has_nullable_fields = __pyx_state[7]; __pyx_result.num_fields = __pyx_state[8]; __pyx_result.schema = __pyx_state[9]
 *     if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_65__pyx_unpickle_LogicalTypeCoderImpl, 0, __pyx_n_s_pyx_unpickle_LogicalTypeCoderI, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__525)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LogicalTypeCoderI, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BigIntegerCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_67__pyx_unpickle_BigIntegerCoderImpl, 0, __pyx_n_s_pyx_unpickle_BigIntegerCoderIm, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__527)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BigIntegerCoderIm, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_BigIntegerCoderImpl__set_state(<BigIntegerCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_BigIntegerCoderImpl__set_state(BigIntegerCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_11apache_beam_6coders_10coder_impl_69__pyx_unpickle_DecimalCoderImpl, 0, __pyx_n_s_pyx_unpickle_DecimalCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__529)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DecimalCoderImpl, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":1
 * #             # <<<<<<<<<<<<<<
 * # Licensed to the Apache Software Foundation (ASF) under one or more
 * # contributor license agreements.  See the NOTICE file distributed with
 */
  __pyx_t_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;

  /* "View.MemoryView":210
 *         info.obj = self
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(array self):
 */
  __pyx_t_2 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_2) < 0) __PYX_ERR(1, 210, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_array_type);

  /* "View.MemoryView":287
 *         return self.name
 * 
 * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__530, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(generic);
  __Pyx_DECREF_SET(generic, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":288
 * 
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
 * cdef indirect = Enum("<strided and indirect>")
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__531, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(strided);
  __Pyx_DECREF_SET(strided, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":289
 * cdef generic = Enum("<strided and direct or indirect>")
 * cdef strided = Enum("<strided and direct>") # default
 * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__532, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(indirect);
  __Pyx_DECREF_SET(indirect, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":292
 * 
 * 
 * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__533, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(contiguous);
  __Pyx_DECREF_SET(contiguous, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":293
 * 
 * cdef contiguous = Enum("<contiguous and direct>")
 * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__534, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(indirect_contiguous);
  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "View.MemoryView":317
 * 
 * DEF THREAD_LOCKS_PREALLOCATED = 8
 * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
 * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
 *     PyThread_allocate_lock(),
 */
  __pyx_memoryview_thread_locks_used = 0;

  /* "View.MemoryView":318
 * DEF THREAD_LOCKS_PREALLOCATED = 8
 * cdef int __pyx_memoryview_thread_locks_used = 0
 * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
 *     PyThread_allocate_lock(),
 *     PyThread_allocate_lock(),
 */
  __pyx_t_14[0] = PyThread_allocate_lock();
  __pyx_t_14[1] = PyThread_allocate_lock();
  __pyx_t_14[2] = PyThread_allocate_lock();
  __pyx_t_14[3] = PyThread_allocate_lock();
  __pyx_t_14[4] = PyThread_allocate_lock();
  __pyx_t_14[5] = PyThread_allocate_lock();
  __pyx_t_14[6] = PyThread_allocate_lock();
  __pyx_t_14[7] = PyThread_allocate_lock();
  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_14, sizeof(__pyx_memoryview_thread_locks[0]) * (8));

  /* "View.MemoryView":551
 *         info.obj = self
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_2) < 0) __PYX_ERR(1, 551, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_memoryview_type);

  /* "View.MemoryView":997
 *         return self.from_object
 * 
 *     __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_2) < 0) __PYX_ERR(1, 997, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_memoryviewslice_type);

  /* "(tree fragment)":1
 * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.name = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init apache_beam.coders.coder_impl", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init apache_beam.coders.coder_impl");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

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

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG)
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

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

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind;
    Py_ssize_t i, char_pos;
    void *result_udata;
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely(char_pos + ulength < 0))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

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

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* pyfrozenset_new */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
    if (it) {
        PyObject* result;
#if CYTHON_COMPILING_IN_PYPY
        PyObject* args;
        args = PyTuple_Pack(1, it);
        if (unlikely(!args))
            return NULL;
        result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
        Py_DECREF(args);
        return result;
#else
        if (PyFrozenSet_CheckExact(it)) {
            Py_INCREF(it);
            return it;
        }
        result = PyFrozenSet_New(it);
        if (unlikely(!result))
            return NULL;
        if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result)))
            return result;
        Py_DECREF(result);
#endif
    }
#if CYTHON_USE_TYPE_SLOTS
    return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#else
    return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
#endif
}

/* PySetContains */
static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
    int result = -1;
    if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
        PyObject *tmpkey;
        PyErr_Clear();
        tmpkey = __Pyx_PyFrozenSet_New(key);
        if (tmpkey != NULL) {
            result = PySet_Contains(set, tmpkey);
            Py_DECREF(tmpkey);
        }
    }
    return result;
}
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
    int result = PySet_Contains(set, key);
    if (unlikely(result < 0)) {
        result = __Pyx_PySet_ContainsUnhashable(set, key);
    }
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* py_dict_items */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
    else
        return PyDict_Items(d);
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

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

/* decode_c_bytes */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    if (unlikely((start < 0) | (stop < 0))) {
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (stop > length)
        stop = length;
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            #else
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            #endif
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
#if PY_MAJOR_VERSION < 3
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
#endif
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
#if PY_MAJOR_VERSION > 2
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
#else
            PyErr_SetString(PyExc_TypeError,
                            "unbound method needs an argument");
#endif
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* UnicodeAsUCS4 */
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
   Py_ssize_t length;
   #if CYTHON_PEP393_ENABLED
   length = PyUnicode_GET_LENGTH(x);
   if (likely(length == 1)) {
       return PyUnicode_READ_CHAR(x, 0);
   }
   #else
   length = PyUnicode_GET_SIZE(x);
   if (likely(length == 1)) {
       return PyUnicode_AS_UNICODE(x)[0];
   }
   #if Py_UNICODE_SIZE == 2
   else if (PyUnicode_GET_SIZE(x) == 2) {
       Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0];
       if (high_val >= 0xD800 && high_val <= 0xDBFF) {
           Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1];
           if (low_val >= 0xDC00 && low_val <= 0xDFFF) {
               return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1)));
           }
       }
   }
   #endif
   #endif
   PyErr_Format(PyExc_ValueError,
                "only single character unicode strings can be converted to Py_UCS4, "
                "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
   return (Py_UCS4)-1;
}

/* object_ord */
static long __Pyx__PyObject_Ord(PyObject* c) {
    Py_ssize_t size;
    if (PyBytes_Check(c)) {
        size = PyBytes_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyBytes_AS_STRING(c)[0];
        }
#if PY_MAJOR_VERSION < 3
    } else if (PyUnicode_Check(c)) {
        return (long)__Pyx_PyUnicode_AsPy_UCS4(c);
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    } else if (PyByteArray_Check(c)) {
        size = PyByteArray_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyByteArray_AS_STRING(c)[0];
        }
#endif
    } else {
        PyErr_Format(PyExc_TypeError,
            "ord() expected string of length 1, but %.200s found", Py_TYPE(c)->tp_name);
        return (long)(Py_UCS4)-1;
    }
    PyErr_Format(PyExc_TypeError,
        "ord() expected a character, but string of length %zd found", size);
    return (long)(Py_UCS4)-1;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
            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(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            b = likely(size) ? digits[0] : 0;
            if (size == -1) b = -b;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (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) {
                        llb = (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) {
                        b = -(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) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        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(op2)) {
        const long a = intval;
        double b = PyFloat_AS_DOUBLE(op2);
            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

/* DivInt[int64_t] */
static CYTHON_INLINE int64_t __Pyx_div_int64_t(int64_t a, int64_t b) {
    int64_t q = a / b;
    int64_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS
#define __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(operand)\
    if (unlikely(zerodivision_check && ((operand) == 0))) {\
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division by zero");\
        return NULL;\
    }
#endif
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(b)
            if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a))
                return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2);
            else {
                long q, r;
                q = a / b;
                r = a - q*b;
                q -= ((r != 0) & ((r ^ b) < 0));
                x = q;
            }
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2);
            }
        }
                __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(b)
                {
                    long q, r;
                    q = a / b;
                    r = a - q*b;
                    q -= ((r != 0) & ((r ^ b) < 0));
                    x = q;
                }
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                {
                    PY_LONG_LONG q, r;
                    q = lla / llb;
                    r = lla - q*llb;
                    q -= ((r != 0) & ((r ^ llb) < 0));
                    llx = q;
                }
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

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

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
#else
    if (is_list || PySequence_Check(o))
#endif
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* DivInt[long] */
static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* ModInt[long] */
static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

/* IterNext */
static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_Occurred();
    if (unlikely(exc_type)) {
        if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return NULL;
        __Pyx_PyErr_Clear();
        Py_INCREF(defval);
        return defval;
    }
    if (defval) {
        Py_INCREF(defval);
        return defval;
    }
    __Pyx_PyErr_SetNone(PyExc_StopIteration);
    return NULL;
}
static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
    PyErr_Format(PyExc_TypeError,
        "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name);
}
static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
    PyObject* next;
    iternextfunc iternext = Py_TYPE(iterator)->tp_iternext;
    if (likely(iternext)) {
#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
        next = iternext(iterator);
        if (likely(next))
            return next;
        #if PY_VERSION_HEX >= 0x02070000 && CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(iternext == &_PyObject_NextNotImplemented))
            return NULL;
        #endif
#else
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
#endif
    } else if (CYTHON_USE_TYPE_SLOTS || unlikely(!PyIter_Check(iterator))) {
        __Pyx_PyIter_Next_ErrorNoIterator(iterator);
        return NULL;
    }
#if !CYTHON_USE_TYPE_SLOTS
    else {
        next = PyIter_Next(iterator);
        if (likely(next))
            return next;
    }
#endif
    return __Pyx_PyIter_Next2Default(defval);
}

/* py_dict_values */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
    else
        return PyDict_Values(d);
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_TRUE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_TRUE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* BufferIndexError */
static void __Pyx_RaiseBufferIndexError(int axis) {
  PyErr_Format(PyExc_IndexError,
     "Out of bounds on buffer access (axis %d)", axis);
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* MemviewSliceInit */
static int
__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
                        int ndim,
                        __Pyx_memviewslice *memviewslice,
                        int memview_is_new_reference)
{
    __Pyx_RefNannyDeclarations
    int i, retval=-1;
    Py_buffer *buf = &memview->view;
    __Pyx_RefNannySetupContext("init_memviewslice", 0);
    if (unlikely(memviewslice->memview || memviewslice->data)) {
        PyErr_SetString(PyExc_ValueError,
            "memviewslice is already initialized!");
        goto fail;
    }
    if (buf->strides) {
        for (i = 0; i < ndim; i++) {
            memviewslice->strides[i] = buf->strides[i];
        }
    } else {
        Py_ssize_t stride = buf->itemsize;
        for (i = ndim - 1; i >= 0; i--) {
            memviewslice->strides[i] = stride;
            stride *= buf->shape[i];
        }
    }
    for (i = 0; i < ndim; i++) {
        memviewslice->shape[i]   = buf->shape[i];
        if (buf->suboffsets) {
            memviewslice->suboffsets[i] = buf->suboffsets[i];
        } else {
            memviewslice->suboffsets[i] = -1;
        }
    }
    memviewslice->memview = memview;
    memviewslice->data = (char *)buf->buf;
    if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
        Py_INCREF(memview);
    }
    retval = 0;
    goto no_fail;
fail:
    memviewslice->memview = 0;
    memviewslice->data = 0;
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}
#ifndef Py_NO_RETURN
#define Py_NO_RETURN
#endif
static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
    va_list vargs;
    char msg[200];
#if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
    va_start(vargs, fmt);
#else
    va_start(vargs);
#endif
    vsnprintf(msg, 200, fmt, vargs);
    va_end(vargs);
    Py_FatalError(msg);
}
static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)++;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
                                   PyThread_type_lock lock)
{
    int result;
    PyThread_acquire_lock(lock, 1);
    result = (*acquisition_count)--;
    PyThread_release_lock(lock);
    return result;
}
static CYTHON_INLINE void
__Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
{
    int first_time;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (unlikely(!memview || (PyObject *) memview == Py_None))
        return;
    if (unlikely(__pyx_get_slice_count(memview) < 0))
        __pyx_fatalerror("Acquisition count is %d (line %d)",
                         __pyx_get_slice_count(memview), lineno);
    first_time = __pyx_add_acquisition_count(memview) == 0;
    if (unlikely(first_time)) {
        if (have_gil) {
            Py_INCREF((PyObject *) memview);
        } else {
            PyGILState_STATE _gilstate = PyGILState_Ensure();
            Py_INCREF((PyObject *) memview);
            PyGILState_Release(_gilstate);
        }
    }
}
static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
                                             int have_gil, int lineno) {
    int last_time;
    struct __pyx_memoryview_obj *memview = memslice->memview;
    if (unlikely(!memview || (PyObject *) memview == Py_None)) {
        memslice->memview = NULL;
        return;
    }
    if (unlikely(__pyx_get_slice_count(memview) <= 0))
        __pyx_fatalerror("Acquisition count is %d (line %d)",
                         __pyx_get_slice_count(memview), lineno);
    last_time = __pyx_sub_acquisition_count(memview) == 1;
    memslice->data = NULL;
    if (unlikely(last_time)) {
        if (have_gil) {
            Py_CLEAR(memslice->memview);
        } else {
            PyGILState_STATE _gilstate = PyGILState_Ensure();
            Py_CLEAR(memslice->memview);
            PyGILState_Release(_gilstate);
        }
    } else {
        memslice->memview = NULL;
    }
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* DivInt[Py_ssize_t] */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_traverse != current_tp_traverse)
        type = type->tp_base;
    while (type && type->tp_traverse == current_tp_traverse)
        type = type->tp_base;
    if (type && type->tp_traverse)
        return type->tp_traverse(obj, v, a);
    return 0;
}

/* CallNextTpClear */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    while (type && type->tp_clear == current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_clear)
        type->tp_clear(obj);
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetVTable */
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_0_29_36
#define __PYX_HAVE_RT_ImportType_0_29_36
static PyTypeObject *__Pyx_ImportType_0_29_36(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_0_29_36 check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_0_29_36 && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_0_29_36 && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* GetVTable */
static void* __Pyx_GetVtable(PyObject *dict) {
    void* ptr;
    PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
    if (!ob)
        goto bad;
#if PY_VERSION_HEX >= 0x02070000
    ptr = PyCapsule_GetPointer(ob, 0);
#else
    ptr = PyCObject_AsVoidPtr(ob);
#endif
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* Globals */
static PyObject* __Pyx_Globals(void) {
    Py_ssize_t i;
    PyObject *names;
    PyObject *globals = __pyx_d;
    Py_INCREF(globals);
    names = PyObject_Dir(__pyx_m);
    if (!names)
        goto bad;
    for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject* name = PySequence_ITEM(names, i);
        if (!name)
            goto bad;
#else
        PyObject* name = PyList_GET_ITEM(names, i);
#endif
        if (!PyDict_Contains(globals, name)) {
            PyObject* value = __Pyx_GetAttr(__pyx_m, name);
            if (!value) {
#if CYTHON_COMPILING_IN_PYPY
                Py_DECREF(name);
#endif
                goto bad;
            }
            if (PyDict_SetItem(globals, name, value) < 0) {
#if CYTHON_COMPILING_IN_PYPY
                Py_DECREF(name);
#endif
                Py_DECREF(value);
                goto bad;
            }
        }
#if CYTHON_COMPILING_IN_PYPY
        Py_DECREF(name);
#endif
    }
    Py_DECREF(names);
    return globals;
bad:
    Py_XDECREF(names);
    Py_XDECREF(globals);
    return NULL;
}

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

/* GetNameInClass */
static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
    PyObject *result;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result) {
        result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
    }
    return result;
}

/* ClassMethod */
static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY
    if (PyMethodDescr_Check(method))
#else
    #if PY_MAJOR_VERSION == 2
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    #else
    PyTypeObject *methoddescr_type = &PyMethodDescr_Type;
    #endif
    if (__Pyx_TypeCheck(method, methoddescr_type))
#endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else {
        return PyClassMethod_New(method);
    }
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
        if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
    PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
    return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
    PyObject *obj = view->obj;
    if (!obj) return;
    if (PyObject_CheckBuffer(obj)) {
        PyBuffer_Release(view);
        return;
    }
    if ((0)) {}
    view->obj = NULL;
    Py_DECREF(obj);
}
#endif


/* MemviewSliceIsContig */
static int
__pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
{
    int i, index, step, start;
    Py_ssize_t itemsize = mvs.memview->view.itemsize;
    if (order == 'F') {
        step = 1;
        start = 0;
    } else {
        step = -1;
        start = ndim - 1;
    }
    for (i = 0; i < ndim; i++) {
        index = start + step * i;
        if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
            return 0;
        itemsize *= mvs.shape[index];
    }
    return 1;
}

/* OverlappingSlices */
static void
__pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
                               void **out_start, void **out_end,
                               int ndim, size_t itemsize)
{
    char *start, *end;
    int i;
    start = end = slice->data;
    for (i = 0; i < ndim; i++) {
        Py_ssize_t stride = slice->strides[i];
        Py_ssize_t extent = slice->shape[i];
        if (extent == 0) {
            *out_start = *out_end = start;
            return;
        } else {
            if (stride > 0)
                end += stride * (extent - 1);
            else
                start += stride * (extent - 1);
        }
    }
    *out_start = start;
    *out_end = end + itemsize;
}
static int
__pyx_slices_overlap(__Pyx_memviewslice *slice1,
                     __Pyx_memviewslice *slice2,
                     int ndim, size_t itemsize)
{
    void *start1, *end1, *start2, *end2;
    __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
    __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
    return (start1 < end2) && (start2 < end1);
}

/* Capsule */
static CYTHON_INLINE PyObject *
__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
{
    PyObject *cobj;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(p, sig, NULL);
#else
    cobj = PyCObject_FromVoidPtr(p, NULL);
#endif
    return cobj;
}

/* IsLittleEndian */
static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
{
  union {
    uint32_t u32;
    uint8_t u8[4];
  } S;
  S.u32 = 0x01020304;
  return S.u8[0] == 4;
}

/* BufferFormatCheck */
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t <= '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1)
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case '?': return "'bool'";
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparseable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
      }
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count;
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break;
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue;
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number, ndim;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return NULL;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
    ndim = ctx->head->field->type->ndim;
    while (*ts && *ts != ')') {
        switch (*ts) {
            case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
            default:  break;
        }
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return NULL;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
            return PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
        if (*ts != ',' && *ts != ')')
            return PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim)
        return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return NULL;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        return ts;
      case ' ':
      case '\r':
      case '\n':
        ++ts;
        break;
      case '<':
        if (!__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_Is_Little_Endian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T':
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}':
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0;
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }
        CYTHON_FALLTHROUGH;
      case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 'p':
        if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
            (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
          ctx->enc_count += ctx->new_count;
          ctx->new_count = 1;
          got_Z = 0;
          ++ts;
          break;
        }
        CYTHON_FALLTHROUGH;
      case 's':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->enc_count = ctx->new_count;
        ctx->enc_packmode = ctx->new_packmode;
        ctx->enc_type = *ts;
        ctx->is_complex = got_Z;
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}

/* TypeInfoCompare */
  static int
__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
{
    int i;
    if (!a || !b)
        return 0;
    if (a == b)
        return 1;
    if (a->size != b->size || a->typegroup != b->typegroup ||
            a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
        if (a->typegroup == 'H' || b->typegroup == 'H') {
            return a->size == b->size;
        } else {
            return 0;
        }
    }
    if (a->ndim) {
        for (i = 0; i < a->ndim; i++)
            if (a->arraysize[i] != b->arraysize[i])
                return 0;
    }
    if (a->typegroup == 'S') {
        if (a->flags != b->flags)
            return 0;
        if (a->fields || b->fields) {
            if (!(a->fields && b->fields))
                return 0;
            for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
                __Pyx_StructField *field_a = a->fields + i;
                __Pyx_StructField *field_b = b->fields + i;
                if (field_a->offset != field_b->offset ||
                    !__pyx_typeinfo_cmp(field_a->type, field_b->type))
                    return 0;
            }
            return !a->fields[i].type && !b->fields[i].type;
        }
    }
    return 1;
}

/* MemviewSliceValidateAndInit */
  static int
__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
{
    if (buf->shape[dim] <= 1)
        return 1;
    if (buf->strides) {
        if (spec & __Pyx_MEMVIEW_CONTIG) {
            if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
                if (unlikely(buf->strides[dim] != sizeof(void *))) {
                    PyErr_Format(PyExc_ValueError,
                                 "Buffer is not indirectly contiguous "
                                 "in dimension %d.", dim);
                    goto fail;
                }
            } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
                PyErr_SetString(PyExc_ValueError,
                                "Buffer and memoryview are not contiguous "
                                "in the same dimension.");
                goto fail;
            }
        }
        if (spec & __Pyx_MEMVIEW_FOLLOW) {
            Py_ssize_t stride = buf->strides[dim];
            if (stride < 0)
                stride = -stride;
            if (unlikely(stride < buf->itemsize)) {
                PyErr_SetString(PyExc_ValueError,
                                "Buffer and memoryview are not contiguous "
                                "in the same dimension.");
                goto fail;
            }
        }
    } else {
        if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
            PyErr_Format(PyExc_ValueError,
                         "C-contiguous buffer is not contiguous in "
                         "dimension %d", dim);
            goto fail;
        } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
            PyErr_Format(PyExc_ValueError,
                         "C-contiguous buffer is not indirect in "
                         "dimension %d", dim);
            goto fail;
        } else if (unlikely(buf->suboffsets)) {
            PyErr_SetString(PyExc_ValueError,
                            "Buffer exposes suboffsets but no strides");
            goto fail;
        }
    }
    return 1;
fail:
    return 0;
}
static int
__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)
{
    if (spec & __Pyx_MEMVIEW_DIRECT) {
        if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
            PyErr_Format(PyExc_ValueError,
                         "Buffer not compatible with direct access "
                         "in dimension %d.", dim);
            goto fail;
        }
    }
    if (spec & __Pyx_MEMVIEW_PTR) {
        if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
            PyErr_Format(PyExc_ValueError,
                         "Buffer is not indirectly accessible "
                         "in dimension %d.", dim);
            goto fail;
        }
    }
    return 1;
fail:
    return 0;
}
static int
__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
{
    int i;
    if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
        Py_ssize_t stride = 1;
        for (i = 0; i < ndim; i++) {
            if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
                PyErr_SetString(PyExc_ValueError,
                    "Buffer not fortran contiguous.");
                goto fail;
            }
            stride = stride * buf->shape[i];
        }
    } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
        Py_ssize_t stride = 1;
        for (i = ndim - 1; i >- 1; i--) {
            if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
                PyErr_SetString(PyExc_ValueError,
                    "Buffer not C contiguous.");
                goto fail;
            }
            stride = stride * buf->shape[i];
        }
    }
    return 1;
fail:
    return 0;
}
static int __Pyx_ValidateAndInit_memviewslice(
                int *axes_specs,
                int c_or_f_flag,
                int buf_flags,
                int ndim,
                __Pyx_TypeInfo *dtype,
                __Pyx_BufFmt_StackElem stack[],
                __Pyx_memviewslice *memviewslice,
                PyObject *original_obj)
{
    struct __pyx_memoryview_obj *memview, *new_memview;
    __Pyx_RefNannyDeclarations
    Py_buffer *buf;
    int i, spec = 0, retval = -1;
    __Pyx_BufFmt_Context ctx;
    int from_memoryview = __pyx_memoryview_check(original_obj);
    __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
    if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
                                                            original_obj)->typeinfo)) {
        memview = (struct __pyx_memoryview_obj *) original_obj;
        new_memview = NULL;
    } else {
        memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                            original_obj, buf_flags, 0, dtype);
        new_memview = memview;
        if (unlikely(!memview))
            goto fail;
    }
    buf = &memview->view;
    if (unlikely(buf->ndim != ndim)) {
        PyErr_Format(PyExc_ValueError,
                "Buffer has wrong number of dimensions (expected %d, got %d)",
                ndim, buf->ndim);
        goto fail;
    }
    if (new_memview) {
        __Pyx_BufFmt_Init(&ctx, stack, dtype);
        if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
    }
    if (unlikely((unsigned) buf->itemsize != dtype->size)) {
        PyErr_Format(PyExc_ValueError,
                     "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
                     "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
                     buf->itemsize,
                     (buf->itemsize > 1) ? "s" : "",
                     dtype->name,
                     dtype->size,
                     (dtype->size > 1) ? "s" : "");
        goto fail;
    }
    if (buf->len > 0) {
        for (i = 0; i < ndim; i++) {
            spec = axes_specs[i];
            if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
                goto fail;
            if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
                goto fail;
        }
        if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
            goto fail;
    }
    if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
                                         new_memview != NULL) == -1)) {
        goto fail;
    }
    retval = 0;
    goto no_fail;
fail:
    Py_XDECREF(new_memview);
    retval = -1;
no_fail:
    __Pyx_RefNannyFinishContext();
    return retval;
}

/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_nn_uint8_t(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                 (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
                                                 &__Pyx_TypeInfo_nn_uint8_t, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

/* ObjectToMemviewSlice */
  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_nn_uint8_t(PyObject *obj, int writable_flag) {
    __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
    __Pyx_BufFmt_StackElem stack[1];
    int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
    int retcode;
    if (obj == Py_None) {
        result.memview = (struct __pyx_memoryview_obj *) Py_None;
        return result;
    }
    retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
                                                 (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
                                                 &__Pyx_TypeInfo_nn_uint8_t, stack,
                                                 &result, obj);
    if (unlikely(retcode == -1))
        goto __pyx_fail;
    return result;
__pyx_fail:
    result.memview = NULL;
    result.data = NULL;
    return result;
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
  static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT) {
                            return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT) {
                            return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 4 * PyLong_SHIFT) {
                            return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int64_t) -1;
        }
    } else {
        int64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int64_t) -1;
        val = __Pyx_PyInt_As_int64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int64_t");
    return (int64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int64_t");
    return (int64_t) -1;
}

/* MemviewSliceCopyTemplate */
  static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
                                 const char *mode, int ndim,
                                 size_t sizeof_dtype, int contig_flag,
                                 int dtype_is_object)
{
    __Pyx_RefNannyDeclarations
    int i;
    __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
    struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
    Py_buffer *buf = &from_memview->view;
    PyObject *shape_tuple = NULL;
    PyObject *temp_int = NULL;
    struct __pyx_array_obj *array_obj = NULL;
    struct __pyx_memoryview_obj *memview_obj = NULL;
    __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
    for (i = 0; i < ndim; i++) {
        if (unlikely(from_mvs->suboffsets[i] >= 0)) {
            PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
                                           "indirect dimensions (axis %d)", i);
            goto fail;
        }
    }
    shape_tuple = PyTuple_New(ndim);
    if (unlikely(!shape_tuple)) {
        goto fail;
    }
    __Pyx_GOTREF(shape_tuple);
    for(i = 0; i < ndim; i++) {
        temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
        if(unlikely(!temp_int)) {
            goto fail;
        } else {
            PyTuple_SET_ITEM(shape_tuple, i, temp_int);
            temp_int = NULL;
        }
    }
    array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
    if (unlikely(!array_obj)) {
        goto fail;
    }
    __Pyx_GOTREF(array_obj);
    memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
                                    (PyObject *) array_obj, contig_flag,
                                    dtype_is_object,
                                    from_mvs->memview->typeinfo);
    if (unlikely(!memview_obj))
        goto fail;
    if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
        goto fail;
    if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
                                                dtype_is_object) < 0))
        goto fail;
    goto no_fail;
fail:
    __Pyx_XDECREF(new_mvs.memview);
    new_mvs.memview = NULL;
    new_mvs.data = NULL;
no_fail:
    __Pyx_XDECREF(shape_tuple);
    __Pyx_XDECREF(temp_int);
    __Pyx_XDECREF(array_obj);
    __Pyx_RefNannyFinishContext();
    return new_mvs;
}

/* CIntFromPy */
  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(unsigned char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned char) 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 (unsigned char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT) {
                            return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT) {
                            return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) >= 4 * PyLong_SHIFT) {
                            return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (unsigned char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, 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 (unsigned char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, 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
            unsigned char 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 (unsigned char) -1;
        }
    } else {
        unsigned char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned char) -1;
        val = __Pyx_PyInt_As_unsigned_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned char");
    return (unsigned char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned char");
    return (unsigned char) -1;
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
  static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 2 * PyLong_SHIFT) {
                            return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 3 * PyLong_SHIFT) {
                            return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 4 * PyLong_SHIFT) {
                            return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int32_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int32_t) -1;
        }
    } else {
        int32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int32_t) -1;
        val = __Pyx_PyInt_As_int32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int32_t");
    return (int32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int32_t");
    return (int32_t) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE int16_t __Pyx_PyInt_As_int16_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int16_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int16_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int16_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int16_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int16_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int16_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) >= 2 * PyLong_SHIFT) {
                            return (int16_t) (((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int16_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) >= 3 * PyLong_SHIFT) {
                            return (int16_t) (((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int16_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) >= 4 * PyLong_SHIFT) {
                            return (int16_t) (((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int16_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int16_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int16_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int16_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int16_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int16_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int16_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int16_t) (((int16_t)-1)*(((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int16_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int16_t) ((((((int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int16_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int16_t) (((int16_t)-1)*(((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int16_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int16_t) ((((((((int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int16_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int16_t) (((int16_t)-1)*(((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int16_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int16_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int16_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int16_t) ((((((((((int16_t)digits[3]) << PyLong_SHIFT) | (int16_t)digits[2]) << PyLong_SHIFT) | (int16_t)digits[1]) << PyLong_SHIFT) | (int16_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int16_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int16_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int16_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int16_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int16_t) -1;
        }
    } else {
        int16_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int16_t) -1;
        val = __Pyx_PyInt_As_int16_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int16_t");
    return (int16_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int16_t");
    return (int16_t) -1;
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int16_t(int16_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int16_t neg_one = (int16_t) -1, const_zero = (int16_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int16_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int16_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int16_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
  static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) 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 (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, 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 (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, 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
            char 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 (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -1;
}

/* CoroutineBase */
  #include <structmember.h>
#include <frameobject.h>
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            assert(f->f_back == NULL);
            #if PY_VERSION_HEX >= 0x030B00A1
            f->f_back = PyThreadState_GetFrame(tstate);
            #else
            Py_XINCREF(tstate->frame);
            f->f_back = tstate->frame;
            #endif
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
static CYTHON_INLINE
PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
#if PY_VERSION_HEX <= 0x030A00A1
    return _PyGen_Send(gen, arg);
#else
    PyObject *result;
    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
        if (PyAsyncGen_CheckExact(gen)) {
            assert(result == Py_None);
            PyErr_SetNone(PyExc_StopAsyncIteration);
        }
        else if (result == Py_None) {
            PyErr_SetNone(PyExc_StopIteration);
        }
        else {
            _PyGen_SetStopIterationValue(result);
        }
        Py_CLEAR(result);
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_frame);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (Py_REFCNT(self) > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    __Pyx_SET_REFCNT(self, 1);
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(Py_REFCNT(self) > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = Py_REFCNT(self);
        _Py_NewReference(self);
        __Pyx_SET_REFCNT(self, refcnt);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(Py_TYPE(self)) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *frame = self->gi_frame;
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            __pyx_d,                 /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        if (unlikely(!frame))
            return NULL;
        self->gi_frame = frame;
    }
    Py_INCREF(frame);
    return frame;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    gen->gi_frame = NULL;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
  #ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
  static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
  static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* VoidPtrExport */
  static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) {
    PyObject *d;
    PyObject *cobj = 0;
    d = PyDict_GetItem(__pyx_d, __pyx_n_s_pyx_capi);
    Py_XINCREF(d);
    if (!d) {
        d = PyDict_New();
        if (!d)
            goto bad;
        if (__Pyx_PyObject_SetAttrStr(__pyx_m, __pyx_n_s_pyx_capi, d) < 0)
            goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItem(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* VoidPtrImport */
  #ifndef __PYX_HAVE_RT_ImportVoidPtr_0_29_36
#define __PYX_HAVE_RT_ImportVoidPtr_0_29_36
static int __Pyx_ImportVoidPtr_0_29_36(PyObject *module, const char *name, void **p, const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, name);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C variable %.200s",
                PyModule_GetName(module), name);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, desc);
        goto bad;
    }
    *p = PyCObject_AsVoidPtr(cobj);}
#endif
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* FunctionImport */
  #ifndef __PYX_HAVE_RT_ImportFunction_0_29_36
#define __PYX_HAVE_RT_ImportFunction_0_29_36
static int __Pyx_ImportFunction_0_29_36(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.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 function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
