/* Generated by Cython 0.28.3 */

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

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

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

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0; // PyThread_create_key reports success always
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif // TSS (Thread Specific Storage) API
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
  #define PyObject_Unicode             PyObject_Str
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

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


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

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

#define __PYX_HAVE__apache_beam__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>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

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

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

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


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

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = 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",
  "type.pxd",
  "apache_beam/coders/stream.pxd",
  "apache_beam/utils/windowed_value.pxd",
};

/*--- 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_WindowedValue;
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_DeterministicFastPrimitivesCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_BytesCoderImpl;
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_IterableCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl;
struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;
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":42
 *   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":64
 *   cpdef libc.stdint.int32_t read_bigendian_int32(self) except? -1
 *   cpdef double read_bigendian_double(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":38
 * 
 * @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_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_36DeterministicFastPrimitivesCoderImpl_estimate_size;
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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_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;

/* "apache_beam/coders/coder_impl.pxd":44
 *   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":48
 *   @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":115
 * 
 *   @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":147
 * 
 *   @cython.locals(c=CoderImpl)
 *   cpdef get_estimated_size_and_observables(self, value, bint nested=?)             # <<<<<<<<<<<<<<
 * 
 *   @cython.locals(wv=windowed_value.WindowedValue)
 */
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":152
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     out = ByteCountingOutputStream()
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15StreamCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":188
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     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":191
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # TODO(robertwb): Remove this once all coders are correct.
 *     if isinstance(value, observable.ObservableMixin):
 */
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":235
 *     return self._underlying_coder.decode(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.estimate_size(value, nested)
 * 
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":238
 *     return self._underlying_coder.estimate_size(value, nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.get_estimated_size_and_observables(
 *         value, nested)
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_get_estimated_size_and_observables {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":277
 *     self.fallback_coder_impl = fallback_coder_impl
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     if isinstance(value, observable.ObservableMixin):
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 */
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":390
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A double is encoded as 8 bytes, regardless of nesting.
 *     return 8
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_14FloatCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":437
 *     return Timestamp(micros=in_stream.read_bigendian_int64())
 * 
 *   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":470
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that VarInts are encoded the same way regardless of nesting.
 *     return get_varint_size(value)
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_15VarIntCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":496
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     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":532
 *          for i, c in enumerate(self._coder_impls)])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores sizes of observable components.
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_26AbstractComponentCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":640
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores element sizes.
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17SequenceCoderImpl_estimate_size {
  int __pyx_n;
  int nested;
};

/* "apache_beam/coders/coder_impl.py":647
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     estimated_size = 0
 */
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":752
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     size = 1
 */
struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_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":39
 * 
 * 
 * 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":51
 * 
 * 
 * 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":25
 * 
 * @cython.final
 * cdef class WindowedValue(object):             # <<<<<<<<<<<<<<
 *   cdef public object value
 *   cdef public object windows
 */
struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue {
  PyObject_HEAD
  struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue *__pyx_vtab;
  PyObject *value;
  PyObject *windows;
  PyObject *pane_info;
  int64_t timestamp_micros;
  PyObject *timestamp_object;
};


/* "apache_beam/coders/coder_impl.pxd":37
 * 
 * 
 * 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":51
 * 
 * 
 * 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":55
 * 
 * 
 * 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":59
 * 
 * 
 * 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":65
 * 
 * 
 * cdef class DeterministicFastPrimitivesCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   cdef CoderImpl _underlying_coder
 *   cdef object _step_label
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *_underlying_coder;
  PyObject *_step_label;
};


/* "apache_beam/coders/coder_impl.pxd":75
 * cdef char BYTES_TYPE, UNICODE_TYPE, LIST_TYPE, TUPLE_TYPE, DICT_TYPE, SET_TYPE
 * 
 * cdef class FastPrimitivesCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef CoderImpl fallback_coder_impl
 *   @cython.locals(dict_value=dict)
 */
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;
};


/* "apache_beam/coders/coder_impl.pxd":81
 * 
 * 
 * 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":85
 * 
 * 
 * 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":89
 * 
 * 
 * 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":94
 * 
 * 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":99
 * 
 * 
 * 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":103
 * 
 * 
 * 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":118
 * 
 * 
 * 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":122
 * 
 * 
 * cdef class SequenceCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef CoderImpl _elem_coder
 *   cpdef _construct_from_sequence(self, values)
 */
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;
};


/* "apache_beam/coders/coder_impl.pxd":127
 * 
 * 
 * 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":131
 * 
 * 
 * cdef class IterableCoderImpl(SequenceCoderImpl):             # <<<<<<<<<<<<<<
 *   pass
 * 
 */
struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_SequenceCoderImpl __pyx_base;
};


/* "apache_beam/coders/coder_impl.pxd":135
 * 
 * 
 * cdef class PaneInfoCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   cdef int _choose_encoding(self, 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":139
 * 
 * 
 * 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;
};



/* "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_double)(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *, double, 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);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *__pyx_vtabptr_11apache_beam_6coders_6stream_OutputStream;


/* "stream.pxd":39
 * 
 * 
 * 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":51
 * 
 * 
 * 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);
  double (*read_bigendian_double)(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":25
 * 
 * @cython.final
 * cdef class WindowedValue(object):             # <<<<<<<<<<<<<<
 *   cdef public object value
 *   cdef public object windows
 */

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


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

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":125
 * 
 * 
 * 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":139
 * 
 * 
 * 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":159
 * 
 * 
 * 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":200
 * 
 * 
 * class DeterministicFastPrimitivesCoderImpl(CoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 */

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl __pyx_base;
  int (*_check_safe)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *, PyObject *);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl;


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

struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl {
  struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_StreamCoderImpl __pyx_base;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl;


/* "apache_beam/coders/coder_impl.py":362
 * 
 * 
 * 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":381
 * 
 * 
 * class FloatCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 */

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":428
 * 
 * 
 * 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":446
 * 
 * 
 * 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":475
 * 
 * 
 * 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":500
 * 
 * 
 * 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":554
 * 
 * 
 * class TupleCoderImpl(AbstractComponentCoderImpl):             # <<<<<<<<<<<<<<
 *   """A coder for tuple objects."""
 * 
 */

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":564
 * 
 * 
 * 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":670
 * 
 * 
 * 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":679
 * 
 * 
 * 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":703
 * 
 * 
 * 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 *, PyObject *);
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl;


/* "apache_beam/coders/coder_impl.py":764
 * 
 * 
 * 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;
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;

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

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

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

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

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

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

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

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

/* py_dict_iteritems.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_IterItems(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)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
                (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
          (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
            (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
            (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(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

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

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

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

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

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

/* 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_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddCObj(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

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

/* 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);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

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

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

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_LshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_LshiftObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceLshift(op1, op2) : PyNumber_Lshift(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_RshiftObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceRshift(op1, op2) : PyNumber_Rshift(op1, op2))
#endif

/* py_abs.proto */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
#define __Pyx_PyNumber_Absolute(x)\
    ((likely(PyLong_CheckExact(x))) ?\
         (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
         PyNumber_Absolute(x))
#else
#define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
#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);

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

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

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

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

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

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

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

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

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

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

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

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

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

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

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

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

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

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

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);

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

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

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

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

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

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

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

/* FunctionImport.proto */
static int __Pyx_ImportFunction(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 int __pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl__check_safe(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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_36DeterministicFastPrimitivesCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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_36DeterministicFastPrimitivesCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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_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_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 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(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__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, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *__pyx_v_out, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_decode_from_stream(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, struct __pyx_obj_11apache_beam_6coders_6stream_InputStream *__pyx_v_in_stream, CYTHON_UNUSED int __pyx_v_nested, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_17PaneInfoCoderImpl_estimate_size *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_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*/

/* 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_WindowedValue = 0;
static PyTypeObject **__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp = 0;
#define __pyx_v_11apache_beam_5utils_14windowed_value_Timestamp (*__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp)
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_DeterministicFastPrimitivesCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl = 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_IterableCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl = 0;
static PyTypeObject *__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = 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_NoneType = 0;
static char __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_NONE_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_INT_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_FLOAT_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_BOOL_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_BYTES_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_UNICODE_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE;
static char __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE;
static PyObject *__pyx_v_11apache_beam_6coders_10coder_impl_small_ints = 0;
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_DeterministicFastPrimitivesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *, 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_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_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_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_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*/
#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_NameError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_enumerate;
static const char __pyx_k__2[] = "";
static const char __pyx_k_in[] = "in_";
static const char __pyx_k_chr[] = "chr";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_len[] = "__len__";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_ret[] = "ret";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k__137[] = "_";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_long[] = "long";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_span[] = "span";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_EARLY[] = "EARLY";
static const char __pyx_k_FIRST[] = "FIRST";
static const char __pyx_k_coder[] = "coder";
static const char __pyx_k_dumps[] = "dumps";
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_range[] = "range";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_write[] = "write";
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_import[] = "__import__";
static const char __pyx_k_micros[] = "micros";
static const char __pyx_k_module[] = "__module__";
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_reduce[] = "__reduce__";
static const char __pyx_k_stream[] = "stream";
static const char __pyx_k_timing[] = "timing";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_UNKNOWN[] = "UNKNOWN";
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_is_last[] = "is_last";
static const char __pyx_k_latin_1[] = "latin-1";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_unicode[] = "unicode";
static const char __pyx_k_windows[] = "windows";
static const char __pyx_k_INT_TYPE[] = "INT_TYPE";
static const char __pyx_k_NoneType[] = "NoneType";
static const char __pyx_k_PaneInfo[] = "PaneInfo";
static const char __pyx_k_SET_TYPE[] = "SET_TYPE";
static const char __pyx_k_builtins[] = "builtins";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_is_first[] = "is_first";
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_setstate[] = "__setstate__";
static const char __pyx_k_BOOL_TYPE[] = "BOOL_TYPE";
static const char __pyx_k_DICT_TYPE[] = "DICT_TYPE";
static const char __pyx_k_LIST_TYPE[] = "LIST_TYPE";
static const char __pyx_k_NONE_TYPE[] = "NONE_TYPE";
static const char __pyx_k_NameError[] = "NameError";
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_enumerate[] = "enumerate";
static const char __pyx_k_get_count[] = "get_count";
static const char __pyx_k_in_stream[] = "in_stream";
static const char __pyx_k_iteritems[] = "iteritems";
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_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_timestamp[] = "timestamp";
static const char __pyx_k_BYTES_TYPE[] = "BYTES_TYPE";
static const char __pyx_k_FLOAT_TYPE[] = "FLOAT_TYPE";
static const char __pyx_k_TUPLE_TYPE[] = "TUPLE_TYPE";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_components[] = "components";
static const char __pyx_k_elem_coder[] = "elem_coder";
static const char __pyx_k_end_millis[] = "end_millis";
static const char __pyx_k_inner_size[] = "inner_size";
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_small_ints[] = "small_ints";
static const char __pyx_k_step_label[] = "step_label";
static const char __pyx_k_value_size[] = "value_size";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_InputStream[] = "InputStream";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_TWO_INDICES[] = "TWO_INDICES";
static const char __pyx_k_coder_impls[] = "coder_impls";
static const char __pyx_k_slow_stream[] = "slow_stream";
static const char __pyx_k_span_micros[] = "span_micros";
static const char __pyx_k_value_coder[] = "value_coder";
static const char __pyx_k_OutputStream[] = "OutputStream";
static const char __pyx_k_UNICODE_TYPE[] = "UNICODE_TYPE";
static const char __pyx_k_UNKNOWN_TYPE[] = "UNKNOWN_TYPE";
static const char __pyx_k_encoded_byte[] = "encoded_byte";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_start_millis[] = "start_millis";
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_value_length[] = "value_length";
static const char __pyx_k_version_info[] = "version_info";
static const char __pyx_k_window_coder[] = "window_coder";
static const char __pyx_k_MAX_TIMESTAMP[] = "MAX_TIMESTAMP";
static const char __pyx_k_MIN_TIMESTAMP[] = "MIN_TIMESTAMP";
static const char __pyx_k_decode_nested[] = "decode_nested";
static const char __pyx_k_encode_nested[] = "encode_nested";
static const char __pyx_k_encoded_value[] = "encoded_value";
static const char __pyx_k_estimate_size[] = "estimate_size";
static const char __pyx_k_proto_message[] = "proto_message";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_value_coder_2[] = "_value_coder";
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_read_var_int64[] = "read_var_int64";
static const char __pyx_k_size_estimator[] = "size_estimator";
static const char __pyx_k_to_normal_time[] = "_to_normal_time";
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_get_nested_size[] = "_get_nested_size";
static const char __pyx_k_get_varint_size[] = "get_varint_size";
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_write_var_int64[] = "write_var_int64";
static const char __pyx_k_CoderImpl_decode[] = "CoderImpl.decode";
static const char __pyx_k_CoderImpl_encode[] = "CoderImpl.encode";
static const char __pyx_k_PaneInfoEncoding[] = "PaneInfoEncoding";
static const char __pyx_k_encode_to_stream[] = "encode_to_stream";
static const char __pyx_k_from_normal_time[] = "_from_normal_time";
static const char __pyx_k_BYTE_TO_PANE_INFO[] = "_BYTE_TO_PANE_INFO";
static const char __pyx_k_SerializeToString[] = "SerializeToString";
static const char __pyx_k_apache_beam_utils[] = "apache_beam.utils";
static const char __pyx_k_apache_beam_coders[] = "apache_beam.coders";
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_proto_message_type[] = "proto_message_type";
static const char __pyx_k_DEFAULT_BUFFER_SIZE[] = "_DEFAULT_BUFFER_SIZE";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
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_nonspeculative_index[] = "nonspeculative_index";
static const char __pyx_k_BytesCoderImpl_decode[] = "BytesCoderImpl.decode";
static const char __pyx_k_BytesCoderImpl_encode[] = "BytesCoderImpl.encode";
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_read_bigendian_uint64[] = "read_bigendian_uint64";
static const char __pyx_k_StreamCoderImpl_decode[] = "StreamCoderImpl.decode";
static const char __pyx_k_StreamCoderImpl_encode[] = "StreamCoderImpl.encode";
static const char __pyx_k_VarIntCoderImpl_decode[] = "VarIntCoderImpl.decode";
static const char __pyx_k_VarIntCoderImpl_encode[] = "VarIntCoderImpl.encode";
static const char __pyx_k_default_size_estimator[] = "_default_size_estimator";
static const char __pyx_k_pyx_unpickle_CoderImpl[] = "__pyx_unpickle_CoderImpl";
static const char __pyx_k_write_bigendian_uint64[] = "write_bigendian_uint64";
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_IntervalWindowCoderImpl[] = "IntervalWindowCoderImpl";
static const char __pyx_k_construct_from_sequence[] = "_construct_from_sequence";
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_CoderImpl___reduce_cython[] = "CoderImpl.__reduce_cython__";
static const char __pyx_k_SingletonCoderImpl_decode[] = "SingletonCoderImpl.decode";
static const char __pyx_k_SingletonCoderImpl_encode[] = "SingletonCoderImpl.encode";
static const char __pyx_k_construct_from_components[] = "_construct_from_components";
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_CoderImpl___setstate_cython[] = "CoderImpl.__setstate_cython__";
static const char __pyx_k_apache_beam_utils_timestamp[] = "apache_beam.utils.timestamp";
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_CoderImpl_decode_from_stream[] = "CoderImpl.decode_from_stream";
static const char __pyx_k_FloatCoderImpl_estimate_size[] = "FloatCoderImpl.estimate_size";
static const char __pyx_k_LengthPrefixCoderImpl___init[] = "LengthPrefixCoderImpl.__init__";
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_StreamCoderImpl_estimate_size[] = "StreamCoderImpl.estimate_size";
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_BytesCoderImpl___reduce_cython[] = "BytesCoderImpl.__reduce_cython__";
static const char __pyx_k_FloatCoderImpl___reduce_cython[] = "FloatCoderImpl.__reduce_cython__";
static const char __pyx_k_TupleCoderImpl___reduce_cython[] = "TupleCoderImpl.__reduce_cython__";
static const char __pyx_k_pyx_unpickle_AbstractComponent[] = "__pyx_unpickle_AbstractComponentCoderImpl";
static const char __pyx_k_pyx_unpickle_CallbackCoderImpl[] = "__pyx_unpickle_CallbackCoderImpl";
static const char __pyx_k_pyx_unpickle_DeterministicFast[] = "__pyx_unpickle_DeterministicFastPrimitivesCoderImpl";
static const char __pyx_k_pyx_unpickle_FastPrimitivesCod[] = "__pyx_unpickle_FastPrimitivesCoderImpl";
static const char __pyx_k_pyx_unpickle_IterableCoderImpl[] = "__pyx_unpickle_IterableCoderImpl";
static const char __pyx_k_pyx_unpickle_PaneInfoCoderImpl[] = "__pyx_unpickle_PaneInfoCoderImpl";
static const char __pyx_k_pyx_unpickle_SequenceCoderImpl[] = "__pyx_unpickle_SequenceCoderImpl";
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_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_PaneInfoCoderImpl_estimate_size[] = "PaneInfoCoderImpl.estimate_size";
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_SimpleCoderImpl___reduce_cython[] = "SimpleCoderImpl.__reduce_cython__";
static const char __pyx_k_StreamCoderImpl___reduce_cython[] = "StreamCoderImpl.__reduce_cython__";
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_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_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_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.\n\nPy2/3 porting: Native range is used on both python versions instead of\nfuture.builtins.range to avoid performance regression in Cython compiled code.\n\nFor internal use only; no backwards-compatibility guarantees.\n";
static const char __pyx_k_DeterministicFastPrimitivesCoder[] = "DeterministicFastPrimitivesCoderImpl.encode_to_stream";
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_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_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_Incompatible_checksums_s_vs_0x0f[] = "Incompatible checksums (%s vs 0x0f41539 = (_step_label, _underlying_coder))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x11[] = "Incompatible checksums (%s vs 0x11860ce = (timestamp_class))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x56[] = "Incompatible checksums (%s vs 0x56b63b6 = (_coder_impls))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x6f[] = "Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x77[] = "Incompatible checksums (%s vs 0x777bafb = (fallback_coder_impl))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x7f[] = "Incompatible checksums (%s vs 0x7f7a287 = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd41d8cd = ())";
static const char __pyx_k_Incompatible_checksums_s_vs_0xd7[] = "Incompatible checksums (%s vs 0xd79bc1f = (_decoder, _encoder, _size_estimator))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xe1[] = "Incompatible checksums (%s vs 0xe106c97 = (_value))";
static const char __pyx_k_IntervalWindowCoderImpl__from_no[] = "IntervalWindowCoderImpl._from_normal_time";
static const char __pyx_k_IntervalWindowCoderImpl__to_norm[] = "IntervalWindowCoderImpl._to_normal_time";
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_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_decode_fro[] = "LengthPrefixCoderImpl.decode_from_stream";
static const char __pyx_k_LengthPrefixCoderImpl_estimate_s[] = "LengthPrefixCoderImpl.estimate_size";
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_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_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_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_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_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_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_deterministically_code[] = "Unable to deterministically code '%s' of type '%s', please provide a type hint for the input of '%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__from_nor[] = "WindowedValueCoderImpl._from_normal_time";
static const char __pyx_k_WindowedValueCoderImpl__to_norma[] = "WindowedValueCoderImpl._to_normal_time";
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_DeterministicFastPrimitivesCoder_2[] = "DeterministicFastPrimitivesCoderImpl.decode_from_stream";
static const char __pyx_k_DeterministicFastPrimitivesCoder_3[] = "DeterministicFastPrimitivesCoderImpl.encode";
static const char __pyx_k_DeterministicFastPrimitivesCoder_4[] = "DeterministicFastPrimitivesCoderImpl.decode";
static const char __pyx_k_DeterministicFastPrimitivesCoder_5[] = "DeterministicFastPrimitivesCoderImpl.estimate_size";
static const char __pyx_k_DeterministicFastPrimitivesCoder_6[] = "DeterministicFastPrimitivesCoderImpl.get_estimated_size_and_observables";
static const char __pyx_k_DeterministicFastPrimitivesCoder_7[] = "DeterministicFastPrimitivesCoderImpl.__reduce_cython__";
static const char __pyx_k_DeterministicFastPrimitivesCoder_8[] = "DeterministicFastPrimitivesCoderImpl.__setstate_cython__";
static const char __pyx_k_For_internal_use_only_no_backwar_2[] = "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_3[] = "For internal use only; no backwards-compatibility guarantees.\n\n  Coder which prefixes the length of the encoded object in the stream.";
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_BOOL_TYPE;
static PyObject *__pyx_n_s_BYTES_TYPE;
static PyObject *__pyx_n_s_BYTE_TO_PANE_INFO;
static PyObject *__pyx_n_s_ByteCountingOutputStream;
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_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_n_s_CallbackCoderImpl_estimate_size;
static PyObject *__pyx_n_s_CallbackCoderImpl_get_estimated;
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_from_stream;
static PyObject *__pyx_n_s_CoderImpl_decode_nested;
static PyObject *__pyx_n_s_CoderImpl_encode;
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_DEFAULT_BUFFER_SIZE;
static PyObject *__pyx_n_s_DICT_TYPE;
static PyObject *__pyx_n_s_DeterministicFastPrimitivesCoder;
static PyObject *__pyx_n_s_DeterministicFastPrimitivesCoder_2;
static PyObject *__pyx_n_s_DeterministicFastPrimitivesCoder_3;
static PyObject *__pyx_n_s_DeterministicFastPrimitivesCoder_4;
static PyObject *__pyx_n_s_DeterministicFastPrimitivesCoder_5;
static PyObject *__pyx_n_s_DeterministicFastPrimitivesCoder_6;
static PyObject *__pyx_n_s_DeterministicFastPrimitivesCoder_7;
static PyObject *__pyx_n_s_DeterministicFastPrimitivesCoder_8;
static PyObject *__pyx_n_s_EARLY;
static PyObject *__pyx_n_s_FIRST;
static PyObject *__pyx_n_s_FLOAT_TYPE;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl___reduce;
static PyObject *__pyx_n_s_FastPrimitivesCoderImpl___setsta;
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_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_n_s_INT_TYPE;
static PyObject *__pyx_n_s_ImportError;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x0f;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x11;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x56;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x6f;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x77;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x7f;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd4;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd7;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xe1;
static PyObject *__pyx_n_s_InputStream;
static PyObject *__pyx_n_s_IntervalWindow;
static PyObject *__pyx_n_s_IntervalWindowCoderImpl;
static PyObject *__pyx_n_s_IntervalWindowCoderImpl__from_no;
static PyObject *__pyx_n_s_IntervalWindowCoderImpl__to_norm;
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_s_Invalid_PaneInfoEncoding_s;
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_LIST_TYPE;
static PyObject *__pyx_n_s_LengthPrefixCoderImpl;
static PyObject *__pyx_n_s_LengthPrefixCoderImpl___init;
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_MAX_TIMESTAMP;
static PyObject *__pyx_n_s_MIN_TIMESTAMP;
static PyObject *__pyx_n_s_NONE_TYPE;
static PyObject *__pyx_n_s_NameError;
static PyObject *__pyx_n_s_NoneType;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_kp_s_Number_of_components_does_not_ma;
static PyObject *__pyx_n_s_ONE_INDEX;
static PyObject *__pyx_n_s_ObservableMixin;
static PyObject *__pyx_n_s_OutputStream;
static PyObject *__pyx_n_s_PaneInfo;
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_PaneInfoTiming;
static PyObject *__pyx_n_s_ParseFromString;
static PyObject *__pyx_n_s_PickleError;
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_SET_TYPE;
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_SerializeToString;
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_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_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_TUPLE_TYPE;
static PyObject *__pyx_n_s_TWO_INDICES;
static PyObject *__pyx_n_s_Timestamp;
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_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___reduce;
static PyObject *__pyx_n_s_TupleSequenceCoderImpl___setstat;
static PyObject *__pyx_n_s_TupleSequenceCoderImpl__construc;
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_deterministically_code;
static PyObject *__pyx_n_s_ValueError;
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_WindowedValueCoderImpl___reduce;
static PyObject *__pyx_n_s_WindowedValueCoderImpl___setstat;
static PyObject *__pyx_n_s_WindowedValueCoderImpl__from_nor;
static PyObject *__pyx_n_s_WindowedValueCoderImpl__to_norma;
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_n_s__137;
static PyObject *__pyx_kp_b__2;
static PyObject *__pyx_n_s_apache_beam_coders;
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_transforms_window;
static PyObject *__pyx_n_s_apache_beam_utils;
static PyObject *__pyx_n_s_apache_beam_utils_timestamp;
static PyObject *__pyx_n_s_builtins;
static PyObject *__pyx_n_s_chr;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_coder;
static PyObject *__pyx_n_s_coder_impls;
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_create_InputStream;
static PyObject *__pyx_n_s_create_OutputStream;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_decode_from_stream;
static PyObject *__pyx_n_s_decode_nested;
static PyObject *__pyx_n_s_decoder;
static PyObject *__pyx_n_s_default_size_estimator;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_2;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_dumps;
static PyObject *__pyx_n_s_elem_coder;
static PyObject *__pyx_n_s_encode;
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_encoded_byte;
static PyObject *__pyx_n_s_encoded_value;
static PyObject *__pyx_n_s_encoder;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_end_millis;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_estimate_size;
static PyObject *__pyx_n_s_extract_components;
static PyObject *__pyx_n_s_fallback_coder_impl;
static PyObject *__pyx_n_s_from_normal_time;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_count;
static PyObject *__pyx_n_s_get_estimated_size_and_observabl;
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_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_inner_size;
static PyObject *__pyx_n_s_is_first;
static PyObject *__pyx_n_s_is_last;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iteritems;
static PyObject *__pyx_kp_s_latin_1;
static PyObject *__pyx_n_s_len;
static PyObject *__pyx_n_s_loads;
static PyObject *__pyx_n_s_long;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_micros;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_nested;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_nonspeculative_index;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_observable;
static PyObject *__pyx_n_s_out;
static PyObject *__pyx_n_s_pane_info;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_proto_message;
static PyObject *__pyx_n_s_proto_message_type;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_capi;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_AbstractComponent;
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_DeterministicFast;
static PyObject *__pyx_n_s_pyx_unpickle_FastPrimitivesCod;
static PyObject *__pyx_n_s_pyx_unpickle_FloatCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_IterableCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_PaneInfoCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_SequenceCoderImpl;
static PyObject *__pyx_n_s_pyx_unpickle_SimpleCoderImpl;
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_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_read_bigendian_uint64;
static PyObject *__pyx_n_s_read_var_int64;
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_ret;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
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_span;
static PyObject *__pyx_n_s_span_micros;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_start_millis;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_step_label;
static PyObject *__pyx_n_s_stream;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_timestamp;
static PyObject *__pyx_n_s_timestamp_coder;
static PyObject *__pyx_n_s_timing;
static PyObject *__pyx_n_s_to_normal_time;
static PyObject *__pyx_n_s_unicode;
static PyObject *__pyx_n_s_unused_value;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_use_setstate;
static PyObject *__pyx_kp_s_utf_8;
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_value_length;
static PyObject *__pyx_n_s_value_size;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_version_info;
static PyObject *__pyx_n_s_window_coder;
static PyObject *__pyx_n_s_windowed_value;
static PyObject *__pyx_n_s_windows;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_write_bigendian_uint64;
static PyObject *__pyx_n_s_write_var_int64;
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_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_10decode_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_12estimate_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_14_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_16get_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_18__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_20__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__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_18__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_coder, PyObject *__pyx_v_step_label); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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_36DeterministicFastPrimitivesCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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_36DeterministicFastPrimitivesCoderImpl_6encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_8decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_12get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_14__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_16__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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 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); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_2get_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_4encode_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_6decode_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_8__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_10__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* 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_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__to_normal_time(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_23IntervalWindowCoderImpl_2_from_normal_time(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_23IntervalWindowCoderImpl_4encode_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_23IntervalWindowCoderImpl_6decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_, CYTHON_UNUSED PyObject *__pyx_v_nested); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_8estimate_size(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_nested); /* 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_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_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 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); /* 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 PyObject *__pyx_pf_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); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_2__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_4__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_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 PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2_from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_4__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_6encode_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_8decode_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_10get_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_12__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_14__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl___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_21LengthPrefixCoderImpl_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_21LengthPrefixCoderImpl_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_21LengthPrefixCoderImpl_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___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_2__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_4__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_6__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_8__pyx_unpickle_DeterministicFastPrimitivesCoderImpl(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_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_12__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_14__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_16__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_18__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_20__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_22__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_24__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_26__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_28__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_30__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_32__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_34__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_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_DeterministicFastPrimitivesCoderImpl(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_BytesCoderImpl(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_IterableCoderImpl(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 __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_iteritems = {0, &__pyx_n_s_iteritems, 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_15;
static PyObject *__pyx_int_1000;
static PyObject *__pyx_int_65536;
static PyObject *__pyx_int_15996217;
static PyObject *__pyx_int_18374862;
static PyObject *__pyx_int_90923958;
static PyObject *__pyx_int_116739418;
static PyObject *__pyx_int_125287163;
static PyObject *__pyx_int_133669511;
static PyObject *__pyx_int_222419149;
static PyObject *__pyx_int_226081823;
static PyObject *__pyx_int_235957399;
static PyObject *__pyx_int_9223372036854775808;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__58;
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_codeobj__5;
static PyObject *__pyx_codeobj__7;
static PyObject *__pyx_codeobj__9;
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__127;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__179;
static PyObject *__pyx_tuple__181;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__185;
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__250;
static PyObject *__pyx_tuple__252;
static PyObject *__pyx_tuple__254;
static PyObject *__pyx_tuple__256;
static PyObject *__pyx_tuple__258;
static PyObject *__pyx_tuple__260;
static PyObject *__pyx_tuple__262;
static PyObject *__pyx_tuple__264;
static PyObject *__pyx_tuple__266;
static PyObject *__pyx_tuple__268;
static PyObject *__pyx_tuple__270;
static PyObject *__pyx_tuple__272;
static PyObject *__pyx_tuple__274;
static PyObject *__pyx_tuple__276;
static PyObject *__pyx_tuple__278;
static PyObject *__pyx_tuple__280;
static PyObject *__pyx_tuple__282;
static PyObject *__pyx_tuple__284;
static PyObject *__pyx_codeobj__11;
static PyObject *__pyx_codeobj__13;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__27;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__45;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__59;
static PyObject *__pyx_codeobj__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__128;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__180;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__186;
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__251;
static PyObject *__pyx_codeobj__253;
static PyObject *__pyx_codeobj__255;
static PyObject *__pyx_codeobj__257;
static PyObject *__pyx_codeobj__259;
static PyObject *__pyx_codeobj__261;
static PyObject *__pyx_codeobj__263;
static PyObject *__pyx_codeobj__265;
static PyObject *__pyx_codeobj__267;
static PyObject *__pyx_codeobj__269;
static PyObject *__pyx_codeobj__271;
static PyObject *__pyx_codeobj__273;
static PyObject *__pyx_codeobj__275;
static PyObject *__pyx_codeobj__277;
static PyObject *__pyx_codeobj__279;
static PyObject *__pyx_codeobj__281;
static PyObject *__pyx_codeobj__283;
static PyObject *__pyx_codeobj__285;
/* Late includes */

/* "apache_beam/coders/coder_impl.py":72
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     raise NotImplementedError
 */

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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 72, __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, 72, __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, 72, __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, 72, __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, 72, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":74
 *   def encode_to_stream(self, value, stream, nested):
 *     """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, 74, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":72
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     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_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)__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;
  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, 72, __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, 72, __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, 72, __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, 72, __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, 72, __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, 72, __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;
  __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, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":76
 *     raise NotImplementedError
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     raise NotImplementedError
 */

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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 76, __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, 76, __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, 76, __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, 76, __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, 76, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":78
 *   def decode_from_stream(self, stream, nested):
 *     """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, 78, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":76
 *     raise NotImplementedError
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     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_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)__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;
  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, 76, __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, 76, __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, 76, __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, 76, __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, 76, __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;
  __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, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.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":80
 *     raise NotImplementedError
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     """Encodes an object to an unnested string."""
 *     raise NotImplementedError
 */

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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __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;
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 80, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

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

  /* "apache_beam/coders/coder_impl.py":80
 *     raise NotImplementedError
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     """Encodes an object to an unnested string."""
 *     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_XDECREF(__pyx_t_5);
  __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;
  __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, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":84
 *     raise NotImplementedError
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     """Decodes an object to an unnested string."""
 *     raise NotImplementedError
 */

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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_encoded);
          __Pyx_GIVEREF(__pyx_v_encoded);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

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

  /* "apache_beam/coders/coder_impl.py":84
 *     raise NotImplementedError
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     """Decodes an object to an unnested string."""
 *     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_XDECREF(__pyx_t_5);
  __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) {
  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, 84, __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;
  __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, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":88
 *     raise NotImplementedError
 * 
 *   def encode_nested(self, value):             # <<<<<<<<<<<<<<
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, True)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_nested); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __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;
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 88, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":89
 * 
 *   def encode_nested(self, value):
 *     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);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __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":90
 *   def encode_nested(self, value):
 *     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, 90, __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, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":91
 *     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, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 91, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":88
 *     raise NotImplementedError
 * 
 *   def encode_nested(self, value):             # <<<<<<<<<<<<<<
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, 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_XDECREF(__pyx_t_5);
  __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_9encode_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_nested = {"encode_nested", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_nested, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_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_8encode_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_8encode_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;
  __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, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":93
 *     return out.get()
 * 
 *   def decode_nested(self, encoded):             # <<<<<<<<<<<<<<
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_nested); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_encoded);
          __Pyx_GIVEREF(__pyx_v_encoded);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":94
 * 
 *   def decode_nested(self, encoded):
 *     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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_encoded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoded};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoded};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __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;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_6stream_InputStream))))) __PYX_ERR(0, 94, __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, 94, __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":93
 *     return out.get()
 * 
 *   def decode_nested(self, encoded):             # <<<<<<<<<<<<<<
 *     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_XDECREF(__pyx_t_5);
  __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_11decode_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_nested = {"decode_nested", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_nested, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  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, 93, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_9CoderImpl_10decode_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_10decode_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;
  __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, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":96
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     return self._get_nested_size(len(self.encode(value)), nested)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_13estimate_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_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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_13estimate_size)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __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, 96, __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, 96, __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, 96, __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, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":98
 *   def estimate_size(self, value, nested=False):
 *     """Estimates the encoded size of the given value, in bytes."""
 *     return self._get_nested_size(len(self.encode(value)), nested)             # <<<<<<<<<<<<<<
 * 
 *   def _get_nested_size(self, inner_size, nested):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->__pyx_vtab)->encode(__pyx_v_self, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __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, 98, __pyx_L1_error)
  }
  __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 98, __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_CoderImpl *)__pyx_v_self->__pyx_vtab)->_get_nested_size(__pyx_v_self, __pyx_t_8, __pyx_v_nested, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":96
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     return self._get_nested_size(len(self.encode(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.CoderImpl.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_9CoderImpl_13estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_12estimate_size[] = "Estimates the encoded size of the given value, in bytes.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_13estimate_size = {"estimate_size", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_13estimate_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_12estimate_size};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_13estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  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, 96, __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, 96, __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, 96, __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_12estimate_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_12estimate_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;
  __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, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":100
 *     return self._get_nested_size(len(self.encode(value)), nested)
 * 
 *   def _get_nested_size(self, inner_size, nested):             # <<<<<<<<<<<<<<
 *     if not nested:
 *       return inner_size
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_15_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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nested_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_15_get_nested_size)) {
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_inner_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __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, 100, __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, 100, __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, 100, __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, 100, __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, 100, __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, 100, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":101
 * 
 *   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":102
 *   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":101
 * 
 *   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":103
 *     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, 103, __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);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __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, 103, __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":104
 *       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":100
 *     return self._get_nested_size(len(self.encode(value)), nested)
 * 
 *   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_15_get_nested_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_15_get_nested_size = {"_get_nested_size", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_15_get_nested_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_15_get_nested_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_inner_size;
  int __pyx_v_nested;
  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, 100, __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, 100, __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, 100, __pyx_L3_error)
    __pyx_v_nested = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_nested == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 100, __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, 100, __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_14_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_14_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;
  __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, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":106
 *     return varint_size + inner_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables.
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_17get_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;
  __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)) {
    __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, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_17get_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, 106, __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, 106, __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, 106, __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, 106, __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, 106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":122
 *       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, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __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":106
 *     return varint_size + inner_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested 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_17get_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_16get_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_17get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_17get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_9CoderImpl_16get_estimated_size_and_observables};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_17get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  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, 106, __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, 106, __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, 106, __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_16get_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_16get_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;
  __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, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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 bint use_setstate
 *     state = ()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_19__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_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_9CoderImpl_18__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_18__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

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

  /* "(tree fragment)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_CoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = ()
 */

  /* 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)":14
 *     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_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_21__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_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_9CoderImpl_20__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_20__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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":130
 *   Subclass of CoderImpl implementing stream methods using encode/decode."""
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     stream.write(self.encode(value), nested)
 */

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;
  __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)) {
    __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)__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, 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":132
 *   def encode_to_stream(self, value, stream, nested):
 *     """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, 132, __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, 132, __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":130
 *   Subclass of CoderImpl implementing stream methods using encode/decode."""
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     stream.write(self.encode(value), 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.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)__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;
  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.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, 130, __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;
  __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, 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.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":134
 *     stream.write(self.encode(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     return self.decode(stream.read_all(nested))
 */

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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 134, __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, 134, __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, 134, __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, 134, __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, 134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":136
 *   def decode_from_stream(self, stream, nested):
 *     """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, 136, __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, 136, __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":134
 *     stream.write(self.encode(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     return self.decode(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.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)__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;
  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, 134, __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, 134, __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, 134, __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, 134, __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, 134, __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;
  __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, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.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 bint use_setstate
 *     state = ()
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

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

  /* "(tree fragment)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SimpleCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SimpleCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SimpleCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = ()
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":144
 *   Subclass of CoderImpl implementing encode/decode using stream methods."""
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, False)
 */

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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __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;
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 144, __pyx_L1_error)
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":145
 * 
 *   def encode(self, value):
 *     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);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __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":146
 *   def encode(self, value):
 *     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, 146, __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, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":147
 *     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, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 147, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":144
 *   Subclass of CoderImpl implementing encode/decode using stream methods."""
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, 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_XDECREF(__pyx_t_5);
  __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;
  __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, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.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":149
 *     return out.get()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_encoded);
          __Pyx_GIVEREF(__pyx_v_encoded);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":150
 * 
 *   def decode(self, encoded):
 *     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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_encoded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoded};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoded};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __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;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_6stream_InputStream))))) __PYX_ERR(0, 150, __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, 150, __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":149
 *     return out.get()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     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_XDECREF(__pyx_t_5);
  __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) {
  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, 149, __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;
  __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, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":152
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     out = ByteCountingOutputStream()
 */

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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 152, __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, 152, __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, 152, __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, 152, __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, 152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":154
 *   def estimate_size(self, value, nested=False):
 *     """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);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_out = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":155
 *     """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, 155, __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, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":156
 *     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, 156, __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);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); 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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":152
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     out = ByteCountingOutputStream()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__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)__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;
  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, 152, __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, 152, __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, 152, __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;
  __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, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = ()
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

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

  /* "(tree fragment)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_StreamCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_StreamCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_StreamCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = ()
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":168
 *   """
 * 
 *   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_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, 168, __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, 168, __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, 168, __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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":169
 * 
 *   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":170
 *   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":171
 *     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, 171, __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, 171, __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":168
 *   """
 * 
 *   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":173
 *     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;
  __Pyx_RefNannySetupContext("_default_size_estimator", 0);

  /* "apache_beam/coders/coder_impl.py":174
 * 
 *   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, 174, __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, 174, __pyx_L1_error)
  }
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 174, __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, 174, __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":173
 *     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":176
 *     return len(self.encode(value))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 176, __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, 176, __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, 176, __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, 176, __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, 176, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":177
 * 
 *   def encode_to_stream(self, value, stream, nested):
 *     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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __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 (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 177, __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, 177, __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":176
 *     return len(self.encode(value))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 176, __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, 176, __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, 176, __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, 176, __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, 176, __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, 176, __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;
  __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, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":179
 *     return stream.write(self._encoder(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 179, __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, 179, __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, 179, __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, 179, __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, 179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":180
 * 
 *   def decode_from_stream(self, stream, nested):
 *     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, 180, __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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __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[2] = {__pyx_t_7, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __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(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __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, 180, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":179
 *     return stream.write(self._encoder(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 179, __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, 179, __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, 179, __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, 179, __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, 179, __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;
  __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, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.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":182
 *     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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 182, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __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;
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 182, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":183
 * 
 *   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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __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;
  if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 183, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":182
 *     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_XDECREF(__pyx_t_5);
  __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;
  __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, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":185
 *     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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); 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)__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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_encoded);
          __Pyx_GIVEREF(__pyx_v_encoded);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":186
 * 
 *   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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_encoded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoded};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoded};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 186, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":185
 *     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_XDECREF(__pyx_t_5);
  __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) {
  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, 185, __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;
  __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, 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.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":188
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 188, __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, 188, __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, 188, __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, 188, __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, 188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":189
 * 
 *   def estimate_size(self, value, nested=False):
 *     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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __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, 189, __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":188
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 188, __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, 188, __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, 188, __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;
  __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, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":191
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # TODO(robertwb): Remove this once all coders are correct.
 *     if isinstance(value, observable.ObservableMixin):
 */

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;
  __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)) {
    __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)__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, 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":193
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     # 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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 193, __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":195
 *     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, 195, __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, 195, __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, 195, __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":193
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     # 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":197
 *       return 1, [(value, self)]
 * 
 *     return self.estimate_size(value, nested), []             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __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, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __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":191
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # TODO(robertwb): Remove this once all coders are correct.
 *     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.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)__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;
  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.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;
  __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, 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.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;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._decoder, self._encoder, self._size_estimator)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_16__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_16__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_CallbackCoderImpl *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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, 3, __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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

    /* "(tree fragment)":5
 *     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)":9
 *         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)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CallbackCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":10
 *     else:
 *         use_setstate = self._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)":13
 *         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_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CallbackCoderImpl); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._decoder, self._encoder, self._size_estimator)
 */

  /* 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)":14
 *     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_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_18__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_18__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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":203
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def __init__(self, coder, step_label):             # <<<<<<<<<<<<<<
 *     self._underlying_coder = coder
 *     self._step_label = step_label
 */

/* Python wrapper */
static int __pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_coder = 0;
  PyObject *__pyx_v_step_label = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coder,&__pyx_n_s_step_label,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)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_step_label)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 203, __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, 203, __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 = values[0];
    __pyx_v_step_label = 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, 203, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.__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_36DeterministicFastPrimitivesCoderImpl___init__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__pyx_v_self), __pyx_v_coder, __pyx_v_step_label);

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

static int __pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl___init__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_coder, PyObject *__pyx_v_step_label) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":204
 * 
 *   def __init__(self, coder, step_label):
 *     self._underlying_coder = coder             # <<<<<<<<<<<<<<
 *     self._step_label = step_label
 * 
 */
  if (!(likely(((__pyx_v_coder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_coder, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(0, 204, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_coder;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_underlying_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_underlying_coder));
  __pyx_v_self->_underlying_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":205
 *   def __init__(self, coder, step_label):
 *     self._underlying_coder = coder
 *     self._step_label = step_label             # <<<<<<<<<<<<<<
 * 
 *   def _check_safe(self, value):
 */
  __Pyx_INCREF(__pyx_v_step_label);
  __Pyx_GIVEREF(__pyx_v_step_label);
  __Pyx_GOTREF(__pyx_v_self->_step_label);
  __Pyx_DECREF(__pyx_v_self->_step_label);
  __pyx_v_self->_step_label = __pyx_v_step_label;

  /* "apache_beam/coders/coder_impl.py":203
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def __init__(self, coder, step_label):             # <<<<<<<<<<<<<<
 *     self._underlying_coder = coder
 *     self._step_label = step_label
 */

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

/* "apache_beam/coders/coder_impl.py":207
 *     self._step_label = step_label
 * 
 *   def _check_safe(self, value):             # <<<<<<<<<<<<<<
 *     if isinstance(value, (bytes, unicode, long, int, float)):
 *       pass
 */

static int __pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl__check_safe(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_x = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  __Pyx_RefNannySetupContext("_check_safe", 0);

  /* "apache_beam/coders/coder_impl.py":208
 * 
 *   def _check_safe(self, value):
 *     if isinstance(value, (bytes, unicode, long, int, float)):             # <<<<<<<<<<<<<<
 *       pass
 *     elif value is None:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_long); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyBytes_Check(__pyx_v_value); 
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = PyObject_IsInstance(__pyx_v_value, __pyx_t_1); 
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); 
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (!__pyx_t_5) {
  } else {
    __pyx_t_3 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = PyInt_Check(__pyx_v_value); 
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyFloat_Check(__pyx_v_value); 
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_3 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_t_3 != 0);
  if (__pyx_t_5) {
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":210
 *     if isinstance(value, (bytes, unicode, long, int, float)):
 *       pass
 *     elif value is None:             # <<<<<<<<<<<<<<
 *       pass
 *     elif isinstance(value, (tuple, list)):
 */
  __pyx_t_5 = (__pyx_v_value == Py_None);
  __pyx_t_3 = (__pyx_t_5 != 0);
  if (__pyx_t_3) {
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":212
 *     elif value is None:
 *       pass
 *     elif isinstance(value, (tuple, list)):             # <<<<<<<<<<<<<<
 *       for x in value:
 *         self._check_safe(x)
 */
  __pyx_t_5 = PyTuple_Check(__pyx_v_value); 
  __pyx_t_4 = (__pyx_t_5 != 0);
  if (!__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_4 = PyList_Check(__pyx_v_value); 
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_3 = __pyx_t_5;
  __pyx_L9_bool_binop_done:;
  __pyx_t_5 = (__pyx_t_3 != 0);
  if (likely(__pyx_t_5)) {

    /* "apache_beam/coders/coder_impl.py":213
 *       pass
 *     elif isinstance(value, (tuple, list)):
 *       for x in value:             # <<<<<<<<<<<<<<
 *         self._check_safe(x)
 *     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_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 213, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_6 >= 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_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 213, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_7(__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, 213, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":214
 *     elif isinstance(value, (tuple, list)):
 *       for x in value:
 *         self._check_safe(x)             # <<<<<<<<<<<<<<
 *     else:
 *       raise TypeError(
 */
      __pyx_t_5 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_safe(__pyx_v_self, __pyx_v_x); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 214, __pyx_L1_error)

      /* "apache_beam/coders/coder_impl.py":213
 *       pass
 *     elif isinstance(value, (tuple, list)):
 *       for x in value:             # <<<<<<<<<<<<<<
 *         self._check_safe(x)
 *     else:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":212
 *     elif value is None:
 *       pass
 *     elif isinstance(value, (tuple, list)):             # <<<<<<<<<<<<<<
 *       for x in value:
 *         self._check_safe(x)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":216
 *         self._check_safe(x)
 *     else:
 *       raise TypeError(             # <<<<<<<<<<<<<<
 *           "Unable to deterministically code '%s' of type '%s', "
 *           "please provide a type hint for the input of '%s'" % (
 */
  /*else*/ {

    /* "apache_beam/coders/coder_impl.py":219
 *           "Unable to deterministically code '%s' of type '%s', "
 *           "please provide a type hint for the input of '%s'" % (
 *               value, type(value), self._step_label))             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, stream, nested):
 */
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __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_INCREF(__pyx_v_self->_step_label);
    __Pyx_GIVEREF(__pyx_v_self->_step_label);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->_step_label);

    /* "apache_beam/coders/coder_impl.py":218
 *       raise TypeError(
 *           "Unable to deterministically code '%s' of type '%s', "
 *           "please provide a type hint for the input of '%s'" % (             # <<<<<<<<<<<<<<
 *               value, type(value), self._step_label))
 * 
 */
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unable_to_deterministically_code, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":216
 *         self._check_safe(x)
 *     else:
 *       raise TypeError(             # <<<<<<<<<<<<<<
 *           "Unable to deterministically code '%s' of type '%s', "
 *           "please provide a type hint for the input of '%s'" % (
 */
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __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, 216, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":207
 *     self._step_label = step_label
 * 
 *   def _check_safe(self, value):             # <<<<<<<<<<<<<<
 *     if isinstance(value, (bytes, unicode, long, int, float)):
 *       pass
 */

  /* 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.DeterministicFastPrimitivesCoderImpl._check_safe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":221
 *               value, type(value), self._step_label))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     self._check_safe(value)
 *     return self._underlying_coder.encode_to_stream(value, stream, nested)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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;
  int __pyx_t_8;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_3encode_to_stream)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __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, 221, __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, 221, __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, 221, __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, 221, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":222
 * 
 *   def encode_to_stream(self, value, stream, nested):
 *     self._check_safe(value)             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.encode_to_stream(value, stream, nested)
 * 
 */
  __pyx_t_8 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_safe(__pyx_v_self, __pyx_v_value); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 222, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":223
 *   def encode_to_stream(self, value, stream, nested):
 *     self._check_safe(value)
 *     return self._underlying_coder.encode_to_stream(value, stream, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, stream, nested):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_underlying_coder->__pyx_vtab)->encode_to_stream(__pyx_v_self->_underlying_coder, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __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":221
 *               value, type(value), self._step_label))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     self._check_safe(value)
 *     return self._underlying_coder.encode_to_stream(value, 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.DeterministicFastPrimitivesCoderImpl.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_36DeterministicFastPrimitivesCoderImpl_3encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_3encode_to_stream = {"encode_to_stream", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_3encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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;
  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, 221, __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, 221, __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, 221, __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, 221, __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, 221, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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, 221, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_2encode_to_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__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_36DeterministicFastPrimitivesCoderImpl_2encode_to_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_encode_to_stream(__pyx_v_self, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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":225
 *     return self._underlying_coder.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.decode_from_stream(stream, nested)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_5decode_from_stream)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __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, 225, __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, 225, __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, 225, __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, 225, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":226
 * 
 *   def decode_from_stream(self, stream, nested):
 *     return self._underlying_coder.decode_from_stream(stream, nested)             # <<<<<<<<<<<<<<
 * 
 *   def encode(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_underlying_coder->__pyx_vtab)->decode_from_stream(__pyx_v_self->_underlying_coder, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __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":225
 *     return self._underlying_coder.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.decode_from_stream(stream, nested)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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_36DeterministicFastPrimitivesCoderImpl_5decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_5decode_from_stream = {"decode_from_stream", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_5decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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;
  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, 225, __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, 225, __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, 225, __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, 225, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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, 225, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_4decode_from_stream(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__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_36DeterministicFastPrimitivesCoderImpl_4decode_from_stream(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_decode_from_stream(__pyx_v_self, __pyx_v_stream, __pyx_v_nested, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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":228
 *     return self._underlying_coder.decode_from_stream(stream, nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     self._check_safe(value)
 *     return self._underlying_coder.encode(value)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_7encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __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;
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 228, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":229
 * 
 *   def encode(self, value):
 *     self._check_safe(value)             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.encode(value)
 * 
 */
  __pyx_t_6 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_safe(__pyx_v_self, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 229, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":230
 *   def encode(self, value):
 *     self._check_safe(value)
 *     return self._underlying_coder.encode(value)             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_underlying_coder->__pyx_vtab)->encode(__pyx_v_self->_underlying_coder, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __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":228
 *     return self._underlying_coder.decode_from_stream(stream, nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     self._check_safe(value)
 *     return self._underlying_coder.encode(value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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_36DeterministicFastPrimitivesCoderImpl_7encode(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_7encode = {"encode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_7encode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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_36DeterministicFastPrimitivesCoderImpl_6encode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_6encode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("encode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_encode(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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":232
 *     return self._underlying_coder.encode(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.decode(encoded)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_9decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_encoded);
          __Pyx_GIVEREF(__pyx_v_encoded);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":233
 * 
 *   def decode(self, encoded):
 *     return self._underlying_coder.decode(encoded)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->_underlying_coder->__pyx_vtab)->decode(__pyx_v_self->_underlying_coder, __pyx_v_encoded, 0); 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;

  /* "apache_beam/coders/coder_impl.py":232
 *     return self._underlying_coder.encode(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.decode(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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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_36DeterministicFastPrimitivesCoderImpl_9decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_9decode = {"decode", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_9decode, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_9decode(PyObject *__pyx_v_self, PyObject *__pyx_v_encoded) {
  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, 232, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_8decode(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__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_36DeterministicFastPrimitivesCoderImpl_8decode(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_encoded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("decode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_decode(__pyx_v_self, __pyx_v_encoded, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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.DeterministicFastPrimitivesCoderImpl.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":235
 *     return self._underlying_coder.decode(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.estimate_size(value, nested)
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_11estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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;
  struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_9CoderImpl_estimate_size __pyx_t_8;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_11estimate_size)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __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, 235, __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, 235, __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, 235, __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, 235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":236
 * 
 *   def estimate_size(self, value, nested=False):
 *     return self._underlying_coder.estimate_size(value, nested)             # <<<<<<<<<<<<<<
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 */
  __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->_underlying_coder->__pyx_vtab)->estimate_size(__pyx_v_self->_underlying_coder, __pyx_v_value, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __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":235
 *     return self._underlying_coder.decode(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.estimate_size(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.DeterministicFastPrimitivesCoderImpl.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_36DeterministicFastPrimitivesCoderImpl_11estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_11estimate_size = {"estimate_size", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_11estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_11estimate_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  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, 235, __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, 235, __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, 235, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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_36DeterministicFastPrimitivesCoderImpl_10estimate_size(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__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_36DeterministicFastPrimitivesCoderImpl_10estimate_size(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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;
  __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_DeterministicFastPrimitivesCoderImpl->__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, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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":238
 *     return self._underlying_coder.estimate_size(value, nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.get_estimated_size_and_observables(
 *         value, nested)
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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_36DeterministicFastPrimitivesCoderImpl_get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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_get_estimated_size_and_observables __pyx_t_8;
  __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)) {
    __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, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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, 238, __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, 238, __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, 238, __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, 238, __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, 238, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":239
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     return self._underlying_coder.get_estimated_size_and_observables(             # <<<<<<<<<<<<<<
 *         value, nested)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":240
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     return self._underlying_coder.get_estimated_size_and_observables(
 *         value, nested)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __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->_underlying_coder->__pyx_vtab)->get_estimated_size_and_observables(__pyx_v_self->_underlying_coder, __pyx_v_value, 0, &__pyx_t_8); 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;

  /* "apache_beam/coders/coder_impl.py":238
 *     return self._underlying_coder.estimate_size(value, nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.get_estimated_size_and_observables(
 *         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.DeterministicFastPrimitivesCoderImpl.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_36DeterministicFastPrimitivesCoderImpl_13get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_13get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_13get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_13get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  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, 238, __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, 238, __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, 238, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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_36DeterministicFastPrimitivesCoderImpl_12get_estimated_size_and_observables(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__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_36DeterministicFastPrimitivesCoderImpl_12get_estimated_size_and_observables(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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;
  __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_DeterministicFastPrimitivesCoderImpl->__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, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl.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 bint use_setstate
 *     state = (self._step_label, self._underlying_coder)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_15__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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_36DeterministicFastPrimitivesCoderImpl_14__reduce_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__pyx_v_self));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_14__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self._step_label, self._underlying_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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->_step_label);
  __Pyx_GIVEREF(__pyx_v_self->_step_label);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_step_label);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_underlying_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_underlying_coder));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->_underlying_coder));
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

  /* "(tree fragment)":5
 *     state = (self._step_label, self._underlying_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)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

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

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self._step_label is not None or self._underlying_coder is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->_step_label != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (((PyObject *)__pyx_v_self->_underlying_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)":10
 *     else:
 *         use_setstate = self._step_label is not None or self._underlying_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":11
 *         use_setstate = self._step_label is not None or self._underlying_coder is not None
 *     if use_setstate:
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_DeterministicFast); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_15996217);
    __Pyx_GIVEREF(__pyx_int_15996217);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_15996217);
    __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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":10
 *     else:
 *         use_setstate = self._step_label is not None or self._underlying_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, None), state
 *     else:
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_DeterministicFast); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_15996217);
    __Pyx_GIVEREF(__pyx_int_15996217);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_15996217);
    __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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._step_label, self._underlying_coder)
 */

  /* 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.DeterministicFastPrimitivesCoderImpl.__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)":14
 *     else:
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_17__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_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_36DeterministicFastPrimitivesCoderImpl_16__setstate_cython__(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__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_36DeterministicFastPrimitivesCoderImpl_16__setstate_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__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.DeterministicFastPrimitivesCoderImpl.__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":246
 *   """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)__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;
  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, 246, __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, 246, __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, 246, __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
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":247
 * 
 *   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, 247, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":246
 *   """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":249
 *     self.proto_message_type = proto_message_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializeToString()
 * 
 */

/* 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)__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;
  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, 249, __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, 249, __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, 249, __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;
  __Pyx_RefNannySetupContext("encode", 0);

  /* "apache_beam/coders/coder_impl.py":250
 * 
 *   def encode(self, value):
 *     return value.SerializeToString()             # <<<<<<<<<<<<<<
 * 
 *   def decode(self, encoded):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_SerializeToString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __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":249
 *     self.proto_message_type = proto_message_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializeToString()
 * 
 */

  /* 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":252
 *     return value.SerializeToString()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)
 */

/* 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)__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;
  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, 252, __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, 252, __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, 252, __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;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("decode", 0);

  /* "apache_beam/coders/coder_impl.py":253
 * 
 *   def decode(self, encoded):
 *     proto_message = self.proto_message_type()             # <<<<<<<<<<<<<<
 *     proto_message.ParseFromString(encoded)
 *     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, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __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":254
 *   def decode(self, encoded):
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)             # <<<<<<<<<<<<<<
 *     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, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_encoded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoded};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoded};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_encoded);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":255
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)
 *     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":252
 *     return value.SerializeToString()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(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.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":274
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def __init__(self, fallback_coder_impl):             # <<<<<<<<<<<<<<
 *     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;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fallback_coder_impl,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_fallback_coder_impl)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 274, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_fallback_coder_impl = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 274, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.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);

  /* 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":275
 * 
 *   def __init__(self, fallback_coder_impl):
 *     self.fallback_coder_impl = fallback_coder_impl             # <<<<<<<<<<<<<<
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 */
  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, 275, __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":274
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def __init__(self, fallback_coder_impl):             # <<<<<<<<<<<<<<
 *     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":277
 *     self.fallback_coder_impl = fallback_coder_impl
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     if isinstance(value, observable.ObservableMixin):
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3get_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;
  __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)) {
    __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, 277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3get_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, 277, __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, 277, __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, 277, __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, 277, __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, 277, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":278
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 *       return 1, [(value, self)]
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ObservableMixin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 278, __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":280
 *     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, 280, __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, 280, __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, 280, __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":278
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     if isinstance(value, observable.ObservableMixin):             # <<<<<<<<<<<<<<
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 *       return 1, [(value, self)]
 */
  }

  /* "apache_beam/coders/coder_impl.py":282
 *       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);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_out = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":283
 * 
 *     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, 283, __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, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":284
 *     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, 284, __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);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __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":277
 *     self.fallback_coder_impl = fallback_coder_impl
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     if isinstance(value, observable.ObservableMixin):
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__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_3get_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_3get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  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, 277, __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, 277, __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, 277, __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_2get_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_2get_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;
  __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, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":286
 *     return out.get_count(), []
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     t = type(value)
 *     if value is None:
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5encode_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;
  PyTypeObject *__pyx_v_t = NULL;
  PyObject *__pyx_v_text_value = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_items = 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;
  int64_t __pyx_t_10;
  double __pyx_t_11;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_12;
  int __pyx_t_13;
  char __pyx_t_14;
  char __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  PyObject *(*__pyx_t_17)(PyObject *);
  PyObject *(*__pyx_t_18)(PyObject *);
  unsigned char __pyx_t_19;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); 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)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5encode_to_stream)) {
      __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[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, 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[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, 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(3+__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_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, 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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":287
 * 
 *   def encode_to_stream(self, value, stream, nested):
 *     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":288
 *   def encode_to_stream(self, value, stream, nested):
 *     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":289
 *     t = type(value)
 *     if value is None:
 *       stream.write_byte(NONE_TYPE)             # <<<<<<<<<<<<<<
 *     elif t is int:
 *       stream.write_byte(INT_TYPE)
 */
    __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, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":288
 *   def encode_to_stream(self, value, stream, nested):
 *     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":290
 *     if value is None:
 *       stream.write_byte(NONE_TYPE)
 *     elif t is int:             # <<<<<<<<<<<<<<
 *       stream.write_byte(INT_TYPE)
 *       stream.write_var_int64(value)
 */
  __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":291
 *       stream.write_byte(NONE_TYPE)
 *     elif t is int:
 *       stream.write_byte(INT_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write_var_int64(value)
 *     elif t is float:
 */
    __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, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":292
 *     elif t is int:
 *       stream.write_byte(INT_TYPE)
 *       stream.write_var_int64(value)             # <<<<<<<<<<<<<<
 *     elif t is float:
 *       stream.write_byte(FLOAT_TYPE)
 */
    __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error)
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_t_10, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":290
 *     if value is None:
 *       stream.write_byte(NONE_TYPE)
 *     elif t is int:             # <<<<<<<<<<<<<<
 *       stream.write_byte(INT_TYPE)
 *       stream.write_var_int64(value)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":293
 *       stream.write_byte(INT_TYPE)
 *       stream.write_var_int64(value)
 *     elif t is float:             # <<<<<<<<<<<<<<
 *       stream.write_byte(FLOAT_TYPE)
 *       stream.write_bigendian_double(value)
 */
  __pyx_t_8 = (__pyx_v_t == (&PyFloat_Type));
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":294
 *       stream.write_var_int64(value)
 *     elif t is float:
 *       stream.write_byte(FLOAT_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write_bigendian_double(value)
 *     elif t is bytes:
 */
    __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_FLOAT_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":295
 *     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_11 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L1_error)
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_bigendian_double(__pyx_v_stream, __pyx_t_11, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":293
 *       stream.write_byte(INT_TYPE)
 *       stream.write_var_int64(value)
 *     elif t is float:             # <<<<<<<<<<<<<<
 *       stream.write_byte(FLOAT_TYPE)
 *       stream.write_bigendian_double(value)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":296
 *       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_9 = (__pyx_v_t == (&PyBytes_Type));
  __pyx_t_8 = (__pyx_t_9 != 0);
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":297
 *       stream.write_bigendian_double(value)
 *     elif t is bytes:
 *       stream.write_byte(BYTES_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write(value, nested)
 *     elif t is unicode:
 */
    __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_BYTES_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

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

    /* "apache_beam/coders/coder_impl.py":296
 *       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":299
 *       stream.write_byte(BYTES_TYPE)
 *       stream.write(value, nested)
 *     elif t is unicode:             # <<<<<<<<<<<<<<
 *       text_value = value  # for typing
 *       stream.write_byte(UNICODE_TYPE)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = (__pyx_v_t == ((PyTypeObject*)__pyx_t_1));
  __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":300
 *       stream.write(value, nested)
 *     elif t is unicode:
 *       text_value = value  # for typing             # <<<<<<<<<<<<<<
 *       stream.write_byte(UNICODE_TYPE)
 *       stream.write(text_value.encode('utf-8'), nested)
 */
    __Pyx_INCREF(__pyx_v_value);
    __pyx_v_text_value = __pyx_v_value;

    /* "apache_beam/coders/coder_impl.py":301
 *     elif t is unicode:
 *       text_value = value  # for typing
 *       stream.write_byte(UNICODE_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write(text_value.encode('utf-8'), nested)
 *     elif t is list or t is tuple or t is set:
 */
    __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_UNICODE_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":302
 *       text_value = value  # for typing
 *       stream.write_byte(UNICODE_TYPE)
 *       stream.write(text_value.encode('utf-8'), nested)             # <<<<<<<<<<<<<<
 *     elif t is list or t is tuple or t is set:
 *       stream.write_byte(
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_text_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 302, __pyx_L1_error)
    __pyx_t_12.__pyx_n = 1;
    __pyx_t_12.nested = __pyx_v_nested;
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write(__pyx_v_stream, ((PyObject*)__pyx_t_2), 0, &__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __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":299
 *       stream.write_byte(BYTES_TYPE)
 *       stream.write(value, nested)
 *     elif t is unicode:             # <<<<<<<<<<<<<<
 *       text_value = value  # for typing
 *       stream.write_byte(UNICODE_TYPE)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":303
 *       stream.write_byte(UNICODE_TYPE)
 *       stream.write(text_value.encode('utf-8'), nested)
 *     elif t is list or t is tuple or t is set:             # <<<<<<<<<<<<<<
 *       stream.write_byte(
 *           LIST_TYPE if t is list else TUPLE_TYPE if t is tuple else SET_TYPE)
 */
  __pyx_t_8 = (__pyx_v_t == (&PyList_Type));
  __pyx_t_13 = (__pyx_t_8 != 0);
  if (!__pyx_t_13) {
  } else {
    __pyx_t_9 = __pyx_t_13;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_13 = (__pyx_v_t == (&PyTuple_Type));
  __pyx_t_8 = (__pyx_t_13 != 0);
  if (!__pyx_t_8) {
  } else {
    __pyx_t_9 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_8 = (__pyx_v_t == (&PySet_Type));
  __pyx_t_13 = (__pyx_t_8 != 0);
  __pyx_t_9 = __pyx_t_13;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":305
 *     elif t is list or t is tuple or t is set:
 *       stream.write_byte(
 *           LIST_TYPE if t is list else TUPLE_TYPE if t is tuple else SET_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write_var_int64(len(value))
 *       for e in value:
 */
    __pyx_t_9 = (__pyx_v_t == (&PyList_Type));
    if ((__pyx_t_9 != 0)) {
      __pyx_t_14 = __pyx_v_11apache_beam_6coders_10coder_impl_LIST_TYPE;
    } else {
      __pyx_t_13 = (__pyx_v_t == (&PyTuple_Type));
      if ((__pyx_t_13 != 0)) {
        __pyx_t_15 = __pyx_v_11apache_beam_6coders_10coder_impl_TUPLE_TYPE;
      } else {
        __pyx_t_15 = __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE;
      }
      __pyx_t_14 = __pyx_t_15;
    }

    /* "apache_beam/coders/coder_impl.py":304
 *       stream.write(text_value.encode('utf-8'), nested)
 *     elif t is list or t is tuple or t is set:
 *       stream.write_byte(             # <<<<<<<<<<<<<<
 *           LIST_TYPE if t is list else TUPLE_TYPE if t is tuple else SET_TYPE)
 *       stream.write_var_int64(len(value))
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_t_14, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

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

    /* "apache_beam/coders/coder_impl.py":307
 *           LIST_TYPE if t is list else TUPLE_TYPE if t is tuple else SET_TYPE)
 *       stream.write_var_int64(len(value))
 *       for e in value:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(e, stream, True)
 *     elif t is dict:
 */
    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_16 = 0;
      __pyx_t_17 = NULL;
    } else {
      __pyx_t_16 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_17 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 307, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_17)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_16 >= 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_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 307, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_16 >= 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_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 307, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_17(__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, 307, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":308
 *       stream.write_var_int64(len(value))
 *       for e in value:
 *         self.encode_to_stream(e, stream, True)             # <<<<<<<<<<<<<<
 *     elif t is dict:
 *       dict_value = value  # for typing
 */
      __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_e, __pyx_v_stream, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

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

  /* "apache_beam/coders/coder_impl.py":309
 *       for e in value:
 *         self.encode_to_stream(e, stream, True)
 *     elif t is dict:             # <<<<<<<<<<<<<<
 *       dict_value = value  # for typing
 *       stream.write_byte(DICT_TYPE)
 */
  __pyx_t_9 = (__pyx_v_t == (&PyDict_Type));
  __pyx_t_13 = (__pyx_t_9 != 0);
  if (__pyx_t_13) {

    /* "apache_beam/coders/coder_impl.py":310
 *         self.encode_to_stream(e, stream, True)
 *     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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 310, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_value;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_dict_value = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":311
 *     elif t is dict:
 *       dict_value = value  # for typing
 *       stream.write_byte(DICT_TYPE)             # <<<<<<<<<<<<<<
 *       stream.write_var_int64(len(dict_value))
 *       # Use iteritems() on Python 2 instead of future.builtins.iteritems to
 */
    __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_DICT_TYPE, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":312
 *       dict_value = value  # for typing
 *       stream.write_byte(DICT_TYPE)
 *       stream.write_var_int64(len(dict_value))             # <<<<<<<<<<<<<<
 *       # Use iteritems() on Python 2 instead of future.builtins.iteritems to
 *       # avoid performance regression in Cython compiled code.
 */
    if (unlikely(__pyx_v_dict_value == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 312, __pyx_L1_error)
    }
    __pyx_t_16 = PyDict_Size(__pyx_v_dict_value); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 312, __pyx_L1_error)
    __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_var_int64(__pyx_v_stream, __pyx_t_16, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":315
 *       # Use iteritems() on Python 2 instead of future.builtins.iteritems to
 *       # avoid performance regression in Cython compiled code.
 *       if sys.version_info[0] == 2:             # <<<<<<<<<<<<<<
 *         items = dict_value.iteritems()  # pylint: disable=dict-iter-method
 *       else:
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 315, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_13) {

      /* "apache_beam/coders/coder_impl.py":316
 *       # avoid performance regression in Cython compiled code.
 *       if sys.version_info[0] == 2:
 *         items = dict_value.iteritems()  # pylint: disable=dict-iter-method             # <<<<<<<<<<<<<<
 *       else:
 *         items = dict_value.items()
 */
      if (unlikely(__pyx_v_dict_value == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
        __PYX_ERR(0, 316, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyDict_IterItems(__pyx_v_dict_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_items = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":315
 *       # Use iteritems() on Python 2 instead of future.builtins.iteritems to
 *       # avoid performance regression in Cython compiled code.
 *       if sys.version_info[0] == 2:             # <<<<<<<<<<<<<<
 *         items = dict_value.iteritems()  # pylint: disable=dict-iter-method
 *       else:
 */
      goto __pyx_L9;
    }

    /* "apache_beam/coders/coder_impl.py":318
 *         items = dict_value.iteritems()  # pylint: disable=dict-iter-method
 *       else:
 *         items = dict_value.items()             # <<<<<<<<<<<<<<
 *       for k, v in items:
 *         self.encode_to_stream(k, stream, True)
 */
    /*else*/ {
      if (unlikely(__pyx_v_dict_value == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
        __PYX_ERR(0, 318, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_dict_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_items = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_L9:;

    /* "apache_beam/coders/coder_impl.py":319
 *       else:
 *         items = dict_value.items()
 *       for k, v in items:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(k, stream, True)
 *         self.encode_to_stream(v, stream, True)
 */
    if (likely(PyList_CheckExact(__pyx_v_items)) || PyTuple_CheckExact(__pyx_v_items)) {
      __pyx_t_2 = __pyx_v_items; __Pyx_INCREF(__pyx_t_2); __pyx_t_16 = 0;
      __pyx_t_17 = NULL;
    } else {
      __pyx_t_16 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_17 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 319, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_17)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          if (__pyx_t_16 >= 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_16); __Pyx_INCREF(__pyx_t_1); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 319, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          if (__pyx_t_16 >= 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_16); __Pyx_INCREF(__pyx_t_1); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 319, __pyx_L1_error)
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_17(__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, 319, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 319, __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, 319, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 319, __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, 319, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_18 = Py_TYPE(__pyx_t_3)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_18(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_7 = __pyx_t_18(__pyx_t_3); if (unlikely(!__pyx_t_7)) goto __pyx_L12_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_3), 2) < 0) __PYX_ERR(0, 319, __pyx_L1_error)
        __pyx_t_18 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L13_unpacking_done;
        __pyx_L12_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_18 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 319, __pyx_L1_error)
        __pyx_L13_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":320
 *         items = dict_value.items()
 *       for k, v in items:
 *         self.encode_to_stream(k, stream, True)             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(v, stream, True)
 *     elif t is bool:
 */
      __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, 320, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":321
 *       for k, v in items:
 *         self.encode_to_stream(k, stream, True)
 *         self.encode_to_stream(v, stream, True)             # <<<<<<<<<<<<<<
 *     elif t is bool:
 *       stream.write_byte(BOOL_TYPE)
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.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, 321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":319
 *       else:
 *         items = dict_value.items()
 *       for k, v in items:             # <<<<<<<<<<<<<<
 *         self.encode_to_stream(k, stream, True)
 *         self.encode_to_stream(v, stream, True)
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":309
 *       for e in value:
 *         self.encode_to_stream(e, stream, True)
 *     elif t is dict:             # <<<<<<<<<<<<<<
 *       dict_value = value  # for typing
 *       stream.write_byte(DICT_TYPE)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":322
 *         self.encode_to_stream(k, stream, True)
 *         self.encode_to_stream(v, stream, True)
 *     elif t is bool:             # <<<<<<<<<<<<<<
 *       stream.write_byte(BOOL_TYPE)
 *       stream.write_byte(value)
 */
  __pyx_t_13 = (__pyx_v_t == ((PyTypeObject*)((PyObject*)&PyBool_Type)));
  __pyx_t_9 = (__pyx_t_13 != 0);
  if (__pyx_t_9) {

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

    /* "apache_beam/coders/coder_impl.py":324
 *     elif t is bool:
 *       stream.write_byte(BOOL_TYPE)
 *       stream.write_byte(value)             # <<<<<<<<<<<<<<
 *     else:
 *       stream.write_byte(UNKNOWN_TYPE)
 */
    __pyx_t_19 = __Pyx_PyInt_As_unsigned_char(__pyx_v_value); if (unlikely((__pyx_t_19 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 324, __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_19, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":322
 *         self.encode_to_stream(k, stream, True)
 *         self.encode_to_stream(v, stream, True)
 *     elif t is bool:             # <<<<<<<<<<<<<<
 *       stream.write_byte(BOOL_TYPE)
 *       stream.write_byte(value)
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":326
 *       stream.write_byte(value)
 *     else:
 *       stream.write_byte(UNKNOWN_TYPE)             # <<<<<<<<<<<<<<
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 * 
 */
  /*else*/ {
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_stream->__pyx_vtab)->write_byte(__pyx_v_stream, __pyx_v_11apache_beam_6coders_10coder_impl_UNKNOWN_TYPE, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":327
 *     else:
 *       stream.write_byte(UNKNOWN_TYPE)
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, stream, nested):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_v_self->fallback_coder_impl->__pyx_vtab)->encode_to_stream(__pyx_v_self->fallback_coder_impl, __pyx_v_value, __pyx_v_stream, __pyx_v_nested, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":286
 *     return out.get_count(), []
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     t = type(value)
 *     if value is None:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_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_t);
  __Pyx_XDECREF(__pyx_v_text_value);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_items);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5encode_to_stream = {"encode_to_stream", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_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;
  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, 286, __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, 286, __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, 286, __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, 286, __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, 286, __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, 286, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_4encode_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_4encode_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;
  __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, 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.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":329
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     t = stream.read_byte()
 *     if t == NONE_TYPE:
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7decode_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) {
  long __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_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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7decode_from_stream)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __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, 329, __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, 329, __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, 329, __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, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":330
 * 
 *   def decode_from_stream(self, stream, nested):
 *     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, 330, __pyx_L1_error)
  __pyx_v_t = __pyx_t_8;

  /* "apache_beam/coders/coder_impl.py":331
 *   def decode_from_stream(self, stream, nested):
 *     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":332
 *     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":331
 *   def decode_from_stream(self, stream, nested):
 *     t = stream.read_byte()
 *     if t == NONE_TYPE:             # <<<<<<<<<<<<<<
 *       return None
 *     elif t == INT_TYPE:
 */
  }

  /* "apache_beam/coders/coder_impl.py":333
 *     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":334
 *       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, 334, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __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":333
 *     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":335
 *     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":336
 *       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, 336, __pyx_L1_error)
    __pyx_t_1 = PyFloat_FromDouble(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __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":335
 *     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":337
 *     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":338
 *       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, 338, __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":337
 *     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":339
 *     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":340
 *       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, 340, __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, 340, __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, 340, __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":339
 *     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":341
 *     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":342
 *       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, 342, __pyx_L1_error)
    __pyx_v_vlen = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":343
 *     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
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __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_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, 343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 343, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_vlist = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "apache_beam/coders/coder_impl.py":344
 *       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":345
 *       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":344
 *       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":346
 *       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":347
 *         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, 347, __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":346
 *       if t == LIST_TYPE:
 *         return vlist
 *       elif t == TUPLE_TYPE:             # <<<<<<<<<<<<<<
 *         return tuple(vlist)
 *       return set(vlist)
 */
    }

    /* "apache_beam/coders/coder_impl.py":348
 *       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, 348, __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":341
 *     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":349
 *         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":350
 *       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, 350, __pyx_L1_error)
    __pyx_v_vlen = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":351
 *     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, 351, __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":352
 *       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":353
 *       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, 353, __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":354
 *       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, 354, __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, 354, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "apache_beam/coders/coder_impl.py":355
 *         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":349
 *         return tuple(vlist)
 *       return set(vlist)
 *     elif t == DICT_TYPE:             # <<<<<<<<<<<<<<
 *       vlen = stream.read_var_int64()
 *       v = {}
 */
  }

  /* "apache_beam/coders/coder_impl.py":356
 *         v[k] = self.decode_from_stream(stream, True)
 *       return v
 *     elif t == BOOL_TYPE:             # <<<<<<<<<<<<<<
 *       return not not stream.read_byte()
 * 
 */
  __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":357
 *       return v
 *     elif t == BOOL_TYPE:
 *       return not not stream.read_byte()             # <<<<<<<<<<<<<<
 * 
 *     return self.fallback_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, 357, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyBool_FromLong((!((!(__pyx_t_8 != 0)) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __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":356
 *         v[k] = self.decode_from_stream(stream, True)
 *       return v
 *     elif t == BOOL_TYPE:             # <<<<<<<<<<<<<<
 *       return not not stream.read_byte()
 * 
 */
  }

  /* "apache_beam/coders/coder_impl.py":359
 *       return not not stream.read_byte()
 * 
 *     return self.fallback_coder_impl.decode_from_stream(stream, nested)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((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_2)) __PYX_ERR(0, 359, __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":329
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     t = stream.read_byte()
 *     if t == NONE_TYPE:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_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_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7decode_from_stream = {"decode_from_stream", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_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;
  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, 329, __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, 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_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, 329, __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, 329, __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, 329, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_6decode_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_6decode_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;
  __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, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self.fallback_coder_impl,)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_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_23FastPrimitivesCoderImpl_8__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_8__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

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

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

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

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

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

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.fallback_coder_impl is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->fallback_coder_impl) != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = self.fallback_coder_impl is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":11
 *         use_setstate = self.fallback_coder_impl is not None
 *     if use_setstate:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_FastPrimitivesCod); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_125287163);
    __Pyx_GIVEREF(__pyx_int_125287163);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_125287163);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self.fallback_coder_impl is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, None), state
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_FastPrimitivesCod); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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_125287163);
    __Pyx_GIVEREF(__pyx_int_125287163);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_125287163);
    __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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = (self.fallback_coder_impl,)
 */

  /* 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.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)":14
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, 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_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_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_23FastPrimitivesCoderImpl_10__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_10__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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, 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":367
 *   A coder for bytes/str objects."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write(value, nested)
 * 
 */

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;
  struct __pyx_opt_args_11apache_beam_6coders_6stream_12OutputStream_write __pyx_t_8;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 367, __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, 367, __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, 367, __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, 367, __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, 367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":368
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     out.write(value, nested)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 368, __pyx_L1_error)
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.nested = __pyx_v_nested;
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_v_value), 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":367
 *   A coder for bytes/str objects."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write(value, 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.BytesCoderImpl.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_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)__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;
  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, 367, __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, 367, __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, 367, __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, 367, __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, 367, __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, 367, __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;
  __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, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":370
 *     out.write(value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 370, __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, 370, __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, 370, __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, 370, __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, 370, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":371
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     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, 371, __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":370
 *     out.write(value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 370, __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, 370, __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, 370, __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, 370, __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, 370, __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;
  __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, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":373
 *     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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 373, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __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;
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 373, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":374
 * 
 *   def encode(self, value):
 *     assert isinstance(value, bytes), (value, type(value))             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_6 = PyBytes_Check(__pyx_v_value); 
    if (unlikely(!(__pyx_t_6 != 0))) {
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __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, 374, __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, 374, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/coders/coder_impl.py":375
 *   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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_value);
  __pyx_r = ((PyObject*)__pyx_v_value);
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":373
 *     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_XDECREF(__pyx_t_5);
  __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;
  __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, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":377
 *     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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_encoded);
          __Pyx_GIVEREF(__pyx_v_encoded);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":378
 * 
 *   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":377
 *     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_XDECREF(__pyx_t_5);
  __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) {
  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, 377, __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;
  __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, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = ()
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

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

  /* "(tree fragment)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BytesCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_BytesCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BytesCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = ()
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":384
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 384, __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, 384, __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, 384, __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, 384, __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, 384, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":385
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     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, 385, __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, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":384
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 384, __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, 384, __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, 384, __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, 384, __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, 384, __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, 384, __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;
  __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, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":387
 *     out.write_bigendian_double(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 387, __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, 387, __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, 387, __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, 387, __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, 387, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":388
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     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, 388, __pyx_L1_error)
  __pyx_t_1 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __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":387
 *     out.write_bigendian_double(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 387, __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, 387, __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, 387, __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, 387, __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, 387, __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;
  __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, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":390
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A double is encoded as 8 bytes, regardless of nesting.
 *     return 8
 */

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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 390, __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, 390, __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, 390, __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, 390, __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, 390, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":392
 *   def estimate_size(self, unused_value, nested=False):
 *     # 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":390
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A double is encoded as 8 bytes, regardless of nesting.
 *     return 8
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__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)__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;
  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, 390, __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, 390, __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, 390, __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;
  __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, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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 bint use_setstate
 *     state = ()
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

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

  /* "(tree fragment)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_FloatCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_FloatCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_FloatCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = ()
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":399
 * 
 *   # 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 - (1 << 63)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1_to_normal_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__to_normal_time[] = "Convert \"lexicographically ordered unsigned\" to signed.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1_to_normal_time = {"_to_normal_time", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1_to_normal_time, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl__to_normal_time};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1_to_normal_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_to_normal_time (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("_to_normal_time", 1, 2, 2, 1); __PYX_ERR(0, 399, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_normal_time") < 0)) __PYX_ERR(0, 399, __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("_to_normal_time", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 399, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl._to_normal_time", __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__to_normal_time(__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_23IntervalWindowCoderImpl__to_normal_time(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;
  __Pyx_RefNannySetupContext("_to_normal_time", 0);

  /* "apache_beam/coders/coder_impl.py":401
 *   def _to_normal_time(self, value):
 *     """Convert "lexicographically ordered unsigned" to signed."""
 *     return value - (1 << 63)             # <<<<<<<<<<<<<<
 * 
 *   def _from_normal_time(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_value, __pyx_int_9223372036854775808); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __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":399
 * 
 *   # 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 - (1 << 63)
 */

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

/* "apache_beam/coders/coder_impl.py":403
 *     return value - (1 << 63)
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3_from_normal_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_2_from_normal_time[] = "Convert signed to \"lexicographically ordered unsigned\".";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3_from_normal_time = {"_from_normal_time", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3_from_normal_time, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_2_from_normal_time};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3_from_normal_time(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_normal_time (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("_from_normal_time", 1, 2, 2, 1); __PYX_ERR(0, 403, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_from_normal_time") < 0)) __PYX_ERR(0, 403, __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("_from_normal_time", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 403, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl._from_normal_time", __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_2_from_normal_time(__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_23IntervalWindowCoderImpl_2_from_normal_time(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;
  __Pyx_RefNannySetupContext("_from_normal_time", 0);

  /* "apache_beam/coders/coder_impl.py":405
 *   def _from_normal_time(self, value):
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Add(__pyx_v_value, __pyx_int_9223372036854775808); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __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":403
 *     return value - (1 << 63)
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)
 */

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

/* "apache_beam/coders/coder_impl.py":407
 *     return value + (1 << 63)
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     span_micros = value.end.micros - value.start.micros
 *     out.write_bigendian_uint64(
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5encode_to_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5encode_to_stream = {"encode_to_stream", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5encode_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;
  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, 407, __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, 407, __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, 407, __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, 407, __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, 407, __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:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_4encode_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_23IntervalWindowCoderImpl_4encode_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_v_span_micros = 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;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);

  /* "apache_beam/coders/coder_impl.py":408
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     span_micros = value.end.micros - value.start.micros             # <<<<<<<<<<<<<<
 *     out.write_bigendian_uint64(
 *         self._from_normal_time(value.end.micros // 1000))
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __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, 408, __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_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_micros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_span_micros = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":409
 *   def encode_to_stream(self, value, out, nested):
 *     span_micros = value.end.micros - value.start.micros
 *     out.write_bigendian_uint64(             # <<<<<<<<<<<<<<
 *         self._from_normal_time(value.end.micros // 1000))
 *     out.write_var_int64(span_micros // 1000)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_write_bigendian_uint64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "apache_beam/coders/coder_impl.py":410
 *     span_micros = value.end.micros - value.start.micros
 *     out.write_bigendian_uint64(
 *         self._from_normal_time(value.end.micros // 1000))             # <<<<<<<<<<<<<<
 *     out.write_var_int64(span_micros // 1000)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_from_normal_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_micros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_6, __pyx_int_1000, 0x3E8, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 410, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __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_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __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[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __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_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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":411
 *     out.write_bigendian_uint64(
 *         self._from_normal_time(value.end.micros // 1000))
 *     out.write_var_int64(span_micros // 1000)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_, nested):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_write_var_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_span_micros, __pyx_int_1000, 0x3E8, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":407
 *     return value + (1 << 63)
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     span_micros = value.end.micros - value.start.micros
 *     out.write_bigendian_uint64(
 */

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

/* "apache_beam/coders/coder_impl.py":413
 *     out.write_var_int64(span_micros // 1000)
 * 
 *   def decode_from_stream(self, in_, nested):             # <<<<<<<<<<<<<<
 *     end_millis = self._to_normal_time(in_.read_bigendian_uint64())
 *     start_millis = end_millis - in_.read_var_int64()
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7decode_from_stream = {"decode_from_stream", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7decode_from_stream(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_in_ = 0;
  CYTHON_UNUSED PyObject *__pyx_v_nested = 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,&__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)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decode_from_stream", 1, 3, 3, 1); __PYX_ERR(0, 413, __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, 413, __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, 413, __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_ = 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, 413, __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:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_6decode_from_stream(__pyx_self, __pyx_v_self, __pyx_v_in_, __pyx_v_nested);

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_6decode_from_stream(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_in_, CYTHON_UNUSED PyObject *__pyx_v_nested) {
  PyObject *__pyx_v_end_millis = NULL;
  PyObject *__pyx_v_start_millis = NULL;
  PyObject *__pyx_v_IntervalWindow = NULL;
  PyObject *__pyx_v_ret = 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;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);

  /* "apache_beam/coders/coder_impl.py":414
 * 
 *   def decode_from_stream(self, in_, nested):
 *     end_millis = self._to_normal_time(in_.read_bigendian_uint64())             # <<<<<<<<<<<<<<
 *     start_millis = end_millis - in_.read_var_int64()
 *     from apache_beam.transforms.window import IntervalWindow
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_to_normal_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_, __pyx_n_s_read_bigendian_uint64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (__pyx_t_5) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __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[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __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_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 414, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_end_millis = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":415
 *   def decode_from_stream(self, in_, nested):
 *     end_millis = self._to_normal_time(in_.read_bigendian_uint64())
 *     start_millis = end_millis - in_.read_var_int64()             # <<<<<<<<<<<<<<
 *     from apache_beam.transforms.window import IntervalWindow
 *     ret = IntervalWindow(start=Timestamp(micros=start_millis * 1000),
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_, __pyx_n_s_read_var_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_5) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Subtract(__pyx_v_end_millis, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_start_millis = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":416
 *     end_millis = self._to_normal_time(in_.read_bigendian_uint64())
 *     start_millis = end_millis - in_.read_var_int64()
 *     from apache_beam.transforms.window import IntervalWindow             # <<<<<<<<<<<<<<
 *     ret = IntervalWindow(start=Timestamp(micros=start_millis * 1000),
 *                          end=Timestamp(micros=end_millis * 1000))
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_IntervalWindow);
  __Pyx_GIVEREF(__pyx_n_s_IntervalWindow);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_IntervalWindow);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_transforms_window, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __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_IntervalWindow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_IntervalWindow = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":417
 *     start_millis = end_millis - in_.read_var_int64()
 *     from apache_beam.transforms.window import IntervalWindow
 *     ret = IntervalWindow(start=Timestamp(micros=start_millis * 1000),             # <<<<<<<<<<<<<<
 *                          end=Timestamp(micros=end_millis * 1000))
 *     return ret
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_start_millis, __pyx_int_1000); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_micros, __pyx_t_3) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start, __pyx_t_3) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "apache_beam/coders/coder_impl.py":418
 *     from apache_beam.transforms.window import IntervalWindow
 *     ret = IntervalWindow(start=Timestamp(micros=start_millis * 1000),
 *                          end=Timestamp(micros=end_millis * 1000))             # <<<<<<<<<<<<<<
 *     return ret
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyNumber_Multiply(__pyx_v_end_millis, __pyx_int_1000); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_micros, __pyx_t_2) < 0) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end, __pyx_t_2) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":417
 *     start_millis = end_millis - in_.read_var_int64()
 *     from apache_beam.transforms.window import IntervalWindow
 *     ret = IntervalWindow(start=Timestamp(micros=start_millis * 1000),             # <<<<<<<<<<<<<<
 *                          end=Timestamp(micros=end_millis * 1000))
 *     return ret
 */
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_IntervalWindow, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ret = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":419
 *     ret = IntervalWindow(start=Timestamp(micros=start_millis * 1000),
 *                          end=Timestamp(micros=end_millis * 1000))
 *     return ret             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":413
 *     out.write_var_int64(span_micros // 1000)
 * 
 *   def decode_from_stream(self, in_, nested):             # <<<<<<<<<<<<<<
 *     end_millis = self._to_normal_time(in_.read_bigendian_uint64())
 *     start_millis = end_millis - in_.read_var_int64()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.IntervalWindowCoderImpl.decode_from_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_end_millis);
  __Pyx_XDECREF(__pyx_v_start_millis);
  __Pyx_XDECREF(__pyx_v_IntervalWindow);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":421
 *     return ret
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 *     # and a varint timespam.
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9estimate_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9estimate_size = {"estimate_size", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9estimate_size, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9estimate_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_nested = 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, 421, __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, 421, __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, 421, __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_8estimate_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_23IntervalWindowCoderImpl_8estimate_size(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_nested) {
  PyObject *__pyx_v_span = 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;
  __Pyx_RefNannySetupContext("estimate_size", 0);

  /* "apache_beam/coders/coder_impl.py":424
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 *     # and a varint timespam.
 *     span = value.end.micros - value.start.micros             # <<<<<<<<<<<<<<
 *     return 8 + get_varint_size(span // 1000)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __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, 424, __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_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_micros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_span = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":425
 *     # and a varint timespam.
 *     span = value.end.micros - value.start.micros
 *     return 8 + get_varint_size(span // 1000)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_span, __pyx_int_1000, 0x3E8, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __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[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __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_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __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_t_2 = __Pyx_PyInt_AddCObj(__pyx_int_8, __pyx_t_1, 8, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __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":421
 *     return ret
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 *     # and a varint timespam.
 */

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

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

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_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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 431, __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, 431, __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, 431, __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, 431, __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, 431, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":432
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     out.write_bigendian_int64(value.micros)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_micros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_8 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_int64(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

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

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(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_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)__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;
  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, 431, __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, 431, __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, 431, __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, 431, __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, 431, __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, 431, __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;
  __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, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":434
 *     out.write_bigendian_int64(value.micros)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return Timestamp(micros=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_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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 434, __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, 434, __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, 434, __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, 434, __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, 434, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":435
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     return Timestamp(micros=in_stream.read_bigendian_int64())             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, unused_value, nested=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Timestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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, 435, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __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, 435, __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, 435, __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":434
 *     out.write_bigendian_int64(value.micros)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return Timestamp(micros=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_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)__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;
  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, 434, __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, 434, __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, 434, __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, 434, __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, 434, __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;
  __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, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":437
 *     return Timestamp(micros=in_stream.read_bigendian_int64())
 * 
 *   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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 437, __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, 437, __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, 437, __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, 437, __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, 437, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":440
 *     # 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":437
 *     return Timestamp(micros=in_stream.read_bigendian_int64())
 * 
 *   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)__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;
  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, 437, __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, 437, __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, 437, __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;
  __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, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self.timestamp_class,)
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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, 3, __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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self.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)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_TimestampCoderImp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = self.timestamp_class is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TimestampCoderImpl, (type(self), 0x11860ce, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_TimestampCoderImp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = (self.timestamp_class,)
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":451
 *   A coder for long/int objects."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 451, __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, 451, __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, 451, __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, 451, __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, 451, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":452
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     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, 452, __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, 452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":451
 *   A coder for long/int objects."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 451, __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, 451, __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, 451, __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, 451, __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, 451, __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, 451, __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;
  __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, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":454
 *     out.write_var_int64(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 454, __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, 454, __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, 454, __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, 454, __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, 454, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":455
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     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, 455, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __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":454
 *     out.write_var_int64(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 454, __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, 454, __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, 454, __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, 454, __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, 454, __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;
  __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, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":457
 *     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;
  PyObject *__pyx_t_5 = NULL;
  int64_t __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __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;
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 457, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":458
 * 
 *   def encode(self, value):
 *     ivalue = value  # type cast             # <<<<<<<<<<<<<<
 *     if 0 <= ivalue < len(small_ints):
 *       return small_ints[ivalue]
 */
  __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 458, __pyx_L1_error)
  __pyx_v_ivalue = __pyx_t_6;

  /* "apache_beam/coders/coder_impl.py":459
 *   def encode(self, value):
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):             # <<<<<<<<<<<<<<
 *       return small_ints[ivalue]
 *     return StreamCoderImpl.encode(self, value)
 */
  __pyx_t_7 = (0 <= __pyx_v_ivalue);
  if (__pyx_t_7) {
    __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_small_ints;
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 459, __pyx_L1_error)
    }
    __pyx_t_8 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = (__pyx_v_ivalue < __pyx_t_8);
  }
  __pyx_t_9 = (__pyx_t_7 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":460
 *     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, 460, __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, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 460, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":459
 *   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":461
 *     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, 461, __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":457
 *     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_XDECREF(__pyx_t_5);
  __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;
  __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, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":463
 *     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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 463, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_encoded);
          __Pyx_GIVEREF(__pyx_v_encoded);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":464
 * 
 *   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, 464, __pyx_L1_error)
  }
  __pyx_t_6 = PyBytes_GET_SIZE(__pyx_v_encoded); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 464, __pyx_L1_error)
  __pyx_t_7 = ((__pyx_t_6 == 1) != 0);
  if (__pyx_t_7) {

    /* "apache_beam/coders/coder_impl.py":465
 *   def decode(self, encoded):
 *     if len(encoded) == 1:
 *       i = ord(encoded)             # <<<<<<<<<<<<<<
 *       if 0 <= i < 128:
 *         return i
 */
    __pyx_t_8 = __Pyx_PyObject_Ord(__pyx_v_encoded); if (unlikely(__pyx_t_8 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(0, 465, __pyx_L1_error)
    __pyx_v_i = __pyx_t_8;

    /* "apache_beam/coders/coder_impl.py":466
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 *       if 0 <= i < 128:             # <<<<<<<<<<<<<<
 *         return i
 *     return StreamCoderImpl.decode(self, encoded)
 */
    __pyx_t_7 = (0 <= __pyx_v_i);
    if (__pyx_t_7) {
      __pyx_t_7 = (__pyx_v_i < 0x80);
    }
    __pyx_t_9 = (__pyx_t_7 != 0);
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":467
 *       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, 467, __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":466
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 *       if 0 <= i < 128:             # <<<<<<<<<<<<<<
 *         return i
 *     return StreamCoderImpl.decode(self, encoded)
 */
    }

    /* "apache_beam/coders/coder_impl.py":464
 * 
 *   def decode(self, encoded):
 *     if len(encoded) == 1:             # <<<<<<<<<<<<<<
 *       i = ord(encoded)
 *       if 0 <= i < 128:
 */
  }

  /* "apache_beam/coders/coder_impl.py":468
 *       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, 468, __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":463
 *     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_XDECREF(__pyx_t_5);
  __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) {
  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, 463, __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;
  __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, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":470
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that VarInts are encoded the same way regardless of nesting.
 *     return get_varint_size(value)
 */

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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 470, __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, 470, __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, 470, __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, 470, __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, 470, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":472
 *   def estimate_size(self, value, nested=False):
 *     # 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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":470
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that VarInts are encoded the same way regardless of nesting.
 *     return get_varint_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.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)__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;
  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, 470, __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, 470, __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, 470, __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;
  __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, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = ()
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

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

  /* "(tree fragment)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_VarIntCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_VarIntCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_VarIntCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = ()
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":480
 *   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_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, 480, __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, 480, __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":481
 * 
 *   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":480
 *   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":483
 *     self._value = value
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 483, __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, 483, __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, 483, __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, 483, __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, 483, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":484
 * 
 *   def encode_to_stream(self, value, stream, nested):
 *     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":483
 *     self._value = value
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 483, __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, 483, __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, 483, __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, 483, __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, 483, __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, 483, __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;
  __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, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":486
 *     pass
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 486, __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, 486, __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, 486, __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, 486, __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, 486, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":487
 * 
 *   def decode_from_stream(self, stream, nested):
 *     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":486
 *     pass
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 486, __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, 486, __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, 486, __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, 486, __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, 486, __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;
  __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, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":489
 *     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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __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;
      if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 489, __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;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":490
 * 
 *   def encode(self, value):
 *     b = b''  # avoid byte vs str vs unicode error             # <<<<<<<<<<<<<<
 *     return b
 * 
 */
  __Pyx_INCREF(__pyx_kp_b__2);
  __pyx_v_b = __pyx_kp_b__2;

  /* "apache_beam/coders/coder_impl.py":491
 *   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":489
 *     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_XDECREF(__pyx_t_5);
  __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;
  __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, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":493
 *     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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_encoded};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_encoded);
          __Pyx_GIVEREF(__pyx_v_encoded);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoded);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":494
 * 
 *   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":493
 *     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_XDECREF(__pyx_t_5);
  __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) {
  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, 493, __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;
  __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, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":496
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 496, __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, 496, __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, 496, __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, 496, __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, 496, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":497
 * 
 *   def estimate_size(self, value, nested=False):
 *     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":496
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     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)__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;
  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, 496, __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, 496, __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, 496, __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;
  __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, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self._value,)
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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, 3, __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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self._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)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SingletonCoderImp); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = self._value is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SingletonCoderImpl, (type(self), 0xe106c97, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SingletonCoderImp); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = (self._value,)
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":505
 *   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_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, 505, __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, 505, __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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":506
 * 
 *   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, 506, __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, 506, __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, 506, __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, 506, __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, 506, __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, 506, __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, 506, __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":507
 *   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(!Py_OptimizeFlag)) {
      __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, 507, __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, 507, __pyx_L1_error)
      }
    }
    #endif

    /* "apache_beam/coders/coder_impl.py":506
 * 
 *   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":508
 *     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, 508, __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":505
 *   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":510
 *     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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extract_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":511
 * 
 *   def _extract_components(self, value):
 *     raise NotImplementedError             # <<<<<<<<<<<<<<
 * 
 *   def _construct_from_components(self, components):
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  __PYX_ERR(0, 511, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":510
 *     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_XDECREF(__pyx_t_5);
  __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;
  __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, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":513
 *     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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_components); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_components};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_components};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_components);
          __Pyx_GIVEREF(__pyx_v_components);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_components);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":514
 * 
 *   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, 514, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":513
 *     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_XDECREF(__pyx_t_5);
  __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;
  __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, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":516
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     values = self._extract_components(value)
 *     if len(self._coder_impls) != len(values):
 */

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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 516, __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, 516, __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, 516, __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, 516, __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, 516, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":517
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     values = self._extract_components(value)             # <<<<<<<<<<<<<<
 *     if len(self._coder_impls) != len(values):
 *       raise ValueError(
 */
  __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, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_values = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":518
 *   def encode_to_stream(self, value, out, nested):
 *     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 = __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, 518, __pyx_L1_error)
  }
  __pyx_t_8 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 518, __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, 518, __pyx_L1_error)
  __pyx_t_10 = ((__pyx_t_8 != __pyx_t_9) != 0);
  if (unlikely(__pyx_t_10)) {

    /* "apache_beam/coders/coder_impl.py":519
 *     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_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __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, 519, __pyx_L1_error)

    /* "apache_beam/coders/coder_impl.py":518
 *   def encode_to_stream(self, value, out, nested):
 *     values = self._extract_components(value)
 *     if len(self._coder_impls) != len(values):             # <<<<<<<<<<<<<<
 *       raise ValueError(
 *           'Number of components does not match number of coders.')
 */
  }

  /* "apache_beam/coders/coder_impl.py":521
 *       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,
 */
  __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, 521, __pyx_L1_error)
  }
  __pyx_t_9 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 521, __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, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __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, 521, __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, 521, __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, 521, __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, 521, __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, 521, __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, 521, __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, 521, __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, 521, __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":522
 *           '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, 522, __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, 522, __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, 522, __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":523
 *     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_1 = __Pyx_PyObject_GetItem(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/coders/coder_impl.py":524
 *       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_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); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __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, 524, __pyx_L1_error)
    }
    __pyx_t_8 = PyTuple_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 524, __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, 524, __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, 524, __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, 524, __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":523
 *     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, 523, __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":521
 *       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,
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":516
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     values = self._extract_components(value)
 *     if len(self._coder_impls) != len(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_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)__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;
  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, 516, __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, 516, __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, 516, __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, 516, __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, 516, __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, 516, __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;
  __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, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":526
 *                          nested or i + 1 < len(self._coder_impls))
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return self._construct_from_components(
 *         [c.decode_from_stream(in_stream,
 */

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) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *__pyx_v_c = 0;
  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;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 526, __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, 526, __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, 526, __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, 526, __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, 526, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":527
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     return self._construct_from_components(             # <<<<<<<<<<<<<<
 *         [c.decode_from_stream(in_stream,
 *                               nested or i + 1 < len(self._coder_impls))
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":528
 *   def decode_from_stream(self, in_stream, nested):
 *     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_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_2 = __pyx_int_0;

  /* "apache_beam/coders/coder_impl.py":530
 *         [c.decode_from_stream(in_stream,
 *                               nested or i + 1 < len(self._coder_impls))
 *          for i, c in enumerate(self._coder_impls)])             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __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, 530, __pyx_L1_error)
    #else
    __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L1_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, 530, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_c, ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_7));
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L1_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":529
 *     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_L5_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_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, 529, __pyx_L1_error)
    }
    __pyx_t_11 = PyTuple_GET_SIZE(__pyx_t_3); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 529, __pyx_L1_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, 529, __pyx_L1_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, 529, __pyx_L1_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, 529, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __pyx_t_10;
    __pyx_L5_bool_binop_done:;

    /* "apache_beam/coders/coder_impl.py":528
 *   def decode_from_stream(self, in_stream, nested):
 *     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_v_c->__pyx_vtab)->decode_from_stream(__pyx_v_c, __pyx_v_in_stream, __pyx_t_9, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 528, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "apache_beam/coders/coder_impl.py":530
 *         [c.decode_from_stream(in_stream,
 *                               nested or i + 1 < len(self._coder_impls))
 *          for i, c in enumerate(self._coder_impls)])             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":527
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     return self._construct_from_components(             # <<<<<<<<<<<<<<
 *         [c.decode_from_stream(in_stream,
 *                               nested or i + 1 < len(self._coder_impls))
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_construct_from_components(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __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":526
 *                          nested or i + 1 < len(self._coder_impls))
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return self._construct_from_components(
 *         [c.decode_from_stream(in_stream,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__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((PyObject *)__pyx_v_c);
  __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_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)__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;
  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, 526, __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, 526, __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, 526, __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, 526, __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, 526, __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;
  __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, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":532
 *          for i, c in enumerate(self._coder_impls)])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores sizes of observable components.
 */

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 *);
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 532, __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, 532, __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, 532, __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, 532, __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, 532, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":536
 *     # 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, 536, __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, 535, __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, 535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __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, 535, __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, 535, __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, 535, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }

  /* "apache_beam/coders/coder_impl.py":535
 *     """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_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":537
 *     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":532
 *          for i, c in enumerate(self._coder_impls)])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores sizes of observable 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.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)__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;
  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, 532, __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, 532, __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, 532, __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;
  __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, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":539
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     values = self._extract_components(value)
 */

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 *);
  __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)) {
    __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, 539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 539, __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, 539, __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, 539, __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, 539, __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, 539, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":541
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     """Returns estimated size of value along with any nested observables."""
 *     values = self._extract_components(value)             # <<<<<<<<<<<<<<
 *     estimated_size = 0
 *     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, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_values = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":542
 *     """Returns estimated size of value along with any nested observables."""
 *     values = self._extract_components(value)
 *     estimated_size = 0             # <<<<<<<<<<<<<<
 *     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":543
 *     values = self._extract_components(value)
 *     estimated_size = 0
 *     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, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_observables = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":544
 *     estimated_size = 0
 *     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, 544, __pyx_L1_error)
  }
  __pyx_t_8 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 544, __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, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __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, 544, __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, 544, __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, 544, __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, 544, __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, 544, __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, 544, __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, 544, __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, 544, __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":545
 *     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, 545, __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, 545, __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, 545, __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":548
 *       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, 548, __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); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __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, 548, __pyx_L1_error)
    }
    __pyx_t_12 = PyTuple_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 548, __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, 548, __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, 548, __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, 548, __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":547
 *       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, 547, __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, 546, __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, 546, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 546, __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, 546, __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, 546, __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, 546, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }

    /* "apache_beam/coders/coder_impl.py":546
 *     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":549
 *           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, 549, __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":550
 *               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, 550, __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":544
 *     estimated_size = 0
 *     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":551
 *       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, 551, __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":539
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     values = self._extract_components(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.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)__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;
  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, 539, __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, 539, __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, 539, __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;
  __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, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self._coder_impls,)
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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, 3, __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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":5
 *     state = (self._coder_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)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

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

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self._coder_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)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_AbstractComponent); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = self._coder_impls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_AbstractComponentCoderImpl, (type(self), 0x56b63b6, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_AbstractComponent); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = (self._coder_impls,)
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":557
 *   """A coder for tuple objects."""
 * 
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     return 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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extract_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 557, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":558
 * 
 *   def _extract_components(self, value):
 *     return value             # <<<<<<<<<<<<<<
 * 
 *   def _construct_from_components(self, components):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_value);
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":557
 *   """A coder for tuple objects."""
 * 
 *   def _extract_components(self, 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_XDECREF(__pyx_t_5);
  __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;
  __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, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":560
 *     return 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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_components); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_components};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_components};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_components);
          __Pyx_GIVEREF(__pyx_v_components);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_components);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":561
 * 
 *   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, 561, __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":560
 *     return 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_XDECREF(__pyx_t_5);
  __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;
  __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, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self._coder_impls,)
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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, 3, __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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":5
 *     state = (self._coder_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)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

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

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self._coder_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)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_TupleCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = self._coder_impls is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleCoderImpl, (type(self), 0x56b63b6, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_TupleCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = (self._coder_impls,)
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":591
 *   _DEFAULT_BUFFER_SIZE = 64 * 1024
 * 
 *   def __init__(self, elem_coder):             # <<<<<<<<<<<<<<
 *     self._elem_coder = elem_coder
 * 
 */

/* 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;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_elem_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_elem_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, 591, __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_elem_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, 591, __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);

  /* 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) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":592
 * 
 *   def __init__(self, elem_coder):
 *     self._elem_coder = elem_coder             # <<<<<<<<<<<<<<
 * 
 *   def _construct_from_sequence(self, values):
 */
  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, 592, __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":591
 *   _DEFAULT_BUFFER_SIZE = 64 * 1024
 * 
 *   def __init__(self, elem_coder):             # <<<<<<<<<<<<<<
 *     self._elem_coder = elem_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.SequenceCoderImpl.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":594
 *     self._elem_coder = elem_coder
 * 
 *   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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_values};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_values};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_values);
          __Pyx_GIVEREF(__pyx_v_values);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_values);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":595
 * 
 *   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, 595, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":594
 *     self._elem_coder = elem_coder
 * 
 *   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_XDECREF(__pyx_t_5);
  __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;
  __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, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":597
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__'):
 */

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) {
  PyObject *__pyx_v_elem = NULL;
  PyObject *__pyx_v_buffer = NULL;
  PyObject *__pyx_v_prev_index = NULL;
  PyObject *__pyx_v_index = 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 *);
  size_t __pyx_t_12;
  int64_t __pyx_t_13;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 597, __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, 597, __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, 597, __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, 597, __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, 597, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":599
 *   def encode_to_stream(self, value, out, nested):
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__'):             # <<<<<<<<<<<<<<
 *       out.write_bigendian_int32(len(value))
 *       for elem in value:
 */
  __pyx_t_8 = __Pyx_HasAttr(__pyx_v_value, __pyx_n_s_len); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 599, __pyx_L1_error)
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":600
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__'):
 *       out.write_bigendian_int32(len(value))             # <<<<<<<<<<<<<<
 *       for elem in value:
 *         self._elem_coder.encode_to_stream(elem, out, True)
 */
    __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 600, __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_10, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":601
 *     if hasattr(value, '__len__'):
 *       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_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 601, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 601, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 601, __pyx_L1_error)
          #else
          __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_11(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 601, __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":602
 *       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, 602, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":601
 *     if hasattr(value, '__len__'):
 *       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":599
 *   def encode_to_stream(self, value, out, nested):
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__'):             # <<<<<<<<<<<<<<
 *       out.write_bigendian_int32(len(value))
 *       for elem in value:
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":609
 * 
 *       # -1 to indicate that the length is not known.
 *       out.write_bigendian_int32(-1)             # <<<<<<<<<<<<<<
 *       buffer = create_OutputStream()
 *       prev_index = index = -1
 */
  /*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, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":610
 *       # -1 to indicate that the length is not known.
 *       out.write_bigendian_int32(-1)
 *       buffer = create_OutputStream()             # <<<<<<<<<<<<<<
 *       prev_index = index = -1
 *       for index, elem in enumerate(value):
 */
    __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);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_buffer = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":611
 *       out.write_bigendian_int32(-1)
 *       buffer = create_OutputStream()
 *       prev_index = index = -1             # <<<<<<<<<<<<<<
 *       for index, elem in enumerate(value):
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 */
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_v_prev_index = __pyx_int_neg_1;
    __Pyx_INCREF(__pyx_int_neg_1);
    __pyx_v_index = __pyx_int_neg_1;

    /* "apache_beam/coders/coder_impl.py":612
 *       buffer = create_OutputStream()
 *       prev_index = index = -1
 *       for index, elem in enumerate(value):             # <<<<<<<<<<<<<<
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 *         if out.size() > self._DEFAULT_BUFFER_SIZE:
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_1 = __pyx_int_0;
    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, 612, __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, 612, __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_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 612, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 612, __pyx_L1_error)
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_11(__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, 612, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1);
      __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "apache_beam/coders/coder_impl.py":613
 *       prev_index = index = -1
 *       for index, elem in enumerate(value):
 *         self._elem_coder.encode_to_stream(elem, buffer, True)             # <<<<<<<<<<<<<<
 *         if out.size() > self._DEFAULT_BUFFER_SIZE:
 *           out.write_var_int64(index - prev_index)
 */
      if (!(likely(((__pyx_v_buffer) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_buffer, __pyx_ptype_11apache_beam_6coders_6stream_OutputStream))))) __PYX_ERR(0, 613, __pyx_L1_error)
      __pyx_t_4 = ((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, ((struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_buffer), 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "apache_beam/coders/coder_impl.py":614
 *       for index, elem in enumerate(value):
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 *         if out.size() > self._DEFAULT_BUFFER_SIZE:             # <<<<<<<<<<<<<<
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())
 */
      __pyx_t_12 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->size(__pyx_v_out, 0); if (unlikely(__pyx_t_12 == ((size_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DEFAULT_BUFFER_SIZE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 614, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_9) {

        /* "apache_beam/coders/coder_impl.py":615
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 *         if out.size() > self._DEFAULT_BUFFER_SIZE:
 *           out.write_var_int64(index - prev_index)             # <<<<<<<<<<<<<<
 *           out.write(buffer.get())
 *           prev_index = index
 */
        __pyx_t_3 = PyNumber_Subtract(__pyx_v_index, __pyx_v_prev_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = __Pyx_PyInt_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_13 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 615, __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_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_13, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "apache_beam/coders/coder_impl.py":616
 *         if out.size() > self._DEFAULT_BUFFER_SIZE:
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())             # <<<<<<<<<<<<<<
 *           prev_index = index
 *           buffer = create_OutputStream()
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 616, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (__pyx_t_4) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 616, __pyx_L1_error)
        __pyx_t_7 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_t_3), 0, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 616, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "apache_beam/coders/coder_impl.py":617
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())
 *           prev_index = index             # <<<<<<<<<<<<<<
 *           buffer = create_OutputStream()
 *       if index > prev_index:
 */
        __Pyx_INCREF(__pyx_v_index);
        __Pyx_DECREF_SET(__pyx_v_prev_index, __pyx_v_index);

        /* "apache_beam/coders/coder_impl.py":618
 *           out.write(buffer.get())
 *           prev_index = index
 *           buffer = create_OutputStream()             # <<<<<<<<<<<<<<
 *       if index > prev_index:
 *         out.write_var_int64(index - prev_index)
 */
        __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream);
        __pyx_t_3 = __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        if (__pyx_t_4) {
          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_buffer, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "apache_beam/coders/coder_impl.py":614
 *       for index, elem in enumerate(value):
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 *         if out.size() > self._DEFAULT_BUFFER_SIZE:             # <<<<<<<<<<<<<<
 *           out.write_var_int64(index - prev_index)
 *           out.write(buffer.get())
 */
      }

      /* "apache_beam/coders/coder_impl.py":612
 *       buffer = create_OutputStream()
 *       prev_index = index = -1
 *       for index, elem in enumerate(value):             # <<<<<<<<<<<<<<
 *         self._elem_coder.encode_to_stream(elem, buffer, True)
 *         if out.size() > self._DEFAULT_BUFFER_SIZE:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":619
 *           prev_index = index
 *           buffer = create_OutputStream()
 *       if index > prev_index:             # <<<<<<<<<<<<<<
 *         out.write_var_int64(index - prev_index)
 *         out.write(buffer.get())
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_index, __pyx_v_prev_index, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":620
 *           buffer = create_OutputStream()
 *       if index > prev_index:
 *         out.write_var_int64(index - prev_index)             # <<<<<<<<<<<<<<
 *         out.write(buffer.get())
 *       out.write_var_int64(0)
 */
      __pyx_t_1 = PyNumber_Subtract(__pyx_v_index, __pyx_v_prev_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __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, 620, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, __pyx_t_13, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":621
 *       if index > prev_index:
 *         out.write_var_int64(index - prev_index)
 *         out.write(buffer.get())             # <<<<<<<<<<<<<<
 *       out.write_var_int64(0)
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_buffer, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __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);
        }
      }
      if (__pyx_t_7) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __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)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 621, __pyx_L1_error)
      __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write(__pyx_v_out, ((PyObject*)__pyx_t_1), 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":619
 *           prev_index = index
 *           buffer = create_OutputStream()
 *       if index > prev_index:             # <<<<<<<<<<<<<<
 *         out.write_var_int64(index - prev_index)
 *         out.write(buffer.get())
 */
    }

    /* "apache_beam/coders/coder_impl.py":622
 *         out.write_var_int64(index - prev_index)
 *         out.write(buffer.get())
 *       out.write_var_int64(0)             # <<<<<<<<<<<<<<
 * 
 *   def decode_from_stream(self, in_stream, nested):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_var_int64(__pyx_v_out, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":597
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__'):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(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(__pyx_v_elem);
  __Pyx_XDECREF(__pyx_v_buffer);
  __Pyx_XDECREF(__pyx_v_prev_index);
  __Pyx_XDECREF(__pyx_v_index);
  __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)__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;
  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, 597, __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, 597, __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, 597, __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, 597, __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, 597, __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, 597, __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;
  __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, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":624
 *       out.write_var_int64(0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     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_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;
  int64_t __pyx_t_11;
  int64_t __pyx_t_12;
  int64_t __pyx_t_13;
  int __pyx_t_14;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__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, 624, __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, 624, __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, 624, __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, 624, __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, 624, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":625
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     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, 625, __pyx_L1_error)
  __pyx_v_size = __pyx_t_8;

  /* "apache_beam/coders/coder_impl.py":627
 *     size = in_stream.read_bigendian_int32()
 * 
 *     if size >= 0:             # <<<<<<<<<<<<<<
 *       elements = [self._elem_coder.decode_from_stream(in_stream, True)
 *                   for _ in range(size)]
 */
  __pyx_t_9 = ((__pyx_v_size >= 0) != 0);
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":628
 * 
 *     if size >= 0:
 *       elements = [self._elem_coder.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *                   for _ in range(size)]
 *     else:
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "apache_beam/coders/coder_impl.py":629
 *     if size >= 0:
 *       elements = [self._elem_coder.decode_from_stream(in_stream, True)
 *                   for _ in range(size)]             # <<<<<<<<<<<<<<
 *     else:
 *       elements = []
 */
    __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_v__ = __pyx_t_11;

      /* "apache_beam/coders/coder_impl.py":628
 * 
 *     if size >= 0:
 *       elements = [self._elem_coder.decode_from_stream(in_stream, True)             # <<<<<<<<<<<<<<
 *                   for _ in range(size)]
 *     else:
 */
      __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, 628, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 628, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_elements = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":627
 *     size = in_stream.read_bigendian_int32()
 * 
 *     if size >= 0:             # <<<<<<<<<<<<<<
 *       elements = [self._elem_coder.decode_from_stream(in_stream, True)
 *                   for _ in range(size)]
 */
    goto __pyx_L3;
  }

  /* "apache_beam/coders/coder_impl.py":631
 *                   for _ in range(size)]
 *     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, 631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_elements = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":632
 *     else:
 *       elements = []
 *       count = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *       while count > 0:
 *         for _ in range(count):
 */
    __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_11 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 632, __pyx_L1_error)
    __pyx_v_count = __pyx_t_11;

    /* "apache_beam/coders/coder_impl.py":633
 *       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":634
 *       count = in_stream.read_var_int64()
 *       while count > 0:
 *         for _ in range(count):             # <<<<<<<<<<<<<<
 *           elements.append(self._elem_coder.decode_from_stream(in_stream, True))
 *         count = in_stream.read_var_int64()
 */
      __pyx_t_11 = __pyx_v_count;
      __pyx_t_12 = __pyx_t_11;
      for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
        __pyx_v__ = __pyx_t_13;

        /* "apache_beam/coders/coder_impl.py":635
 *       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, 635, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_elements, __pyx_t_1); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 635, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }

      /* "apache_beam/coders/coder_impl.py":636
 *         for _ in range(count):
 *           elements.append(self._elem_coder.decode_from_stream(in_stream, True))
 *         count = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 * 
 *     return self._construct_from_sequence(elements)
 */
      __pyx_t_11 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_InputStream *)__pyx_v_in_stream->__pyx_vtab)->read_var_int64(__pyx_v_in_stream, 0); if (unlikely(__pyx_t_11 == ((int64_t)-1L) && PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error)
      __pyx_v_count = __pyx_t_11;
    }
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":638
 *         count = in_stream.read_var_int64()
 * 
 *     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, 638, __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":624
 *       out.write_var_int64(0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     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_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)__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;
  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, 624, __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, 624, __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, 624, __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, 624, __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, 624, __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;
  __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, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("apache_beam.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":640
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores element sizes.
 */

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 *);
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 640, __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, 640, __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, 640, __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, 640, __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, 640, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":644
 *     # 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, 644, __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, 643, __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, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 643, __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, 643, __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, 643, __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, 643, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }

  /* "apache_beam/coders/coder_impl.py":643
 *     """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_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":645
 *     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":640
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores element sizes.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__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)__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;
  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, 640, __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, 640, __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, 640, __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;
  __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, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":647
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     estimated_size = 0
 */

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 *);
  __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)) {
    __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, 647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 647, __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, 647, __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, 647, __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, 647, __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, 647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":649
 *   def get_estimated_size_and_observables(self, value, nested=False):
 *     """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":651
 *     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); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __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":652
 *     # 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_GetModuleGlobalName(__pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __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, 652, __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, 652, __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":653
 *     estimated_size += 4
 *     if isinstance(value, observable.ObservableMixin):
 *       return estimated_size, [(value, self._elem_coder)]             # <<<<<<<<<<<<<<
 * 
 *     observables = []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __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, 653, __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, 653, __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":652
 *     # 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":655
 *       return estimated_size, [(value, self._elem_coder)]
 * 
 *     observables = []             # <<<<<<<<<<<<<<
 *     for elem in value:
 *       child_size, child_observables = (
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_observables = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":656
 * 
 *     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, 656, __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, 656, __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, 656, __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, 656, __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, 656, __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, 656, __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, 656, __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":658
 *     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, 658, __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, 657, __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, 657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 657, __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, 657, __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, 657, __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, 657, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }

    /* "apache_beam/coders/coder_impl.py":657
 *     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":660
 *           self._elem_coder.get_estimated_size_and_observables(
 *               elem, nested=True))
 *       estimated_size += child_size             # <<<<<<<<<<<<<<
 *       observables += child_observables
 *     # TODO: (BEAM-1537) Update to use an accurate count depending on size and
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_estimated_size, __pyx_v_child_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __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":661
 *               elem, nested=True))
 *       estimated_size += child_size
 *       observables += child_observables             # <<<<<<<<<<<<<<
 *     # TODO: (BEAM-1537) Update to use an accurate count depending on size and
 *     # count, currently we are underestimating the size by up to 10 bytes
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_observables, __pyx_v_child_observables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __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":656
 * 
 *     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":667
 *     # occurs at most once per 64k of data and is upto 10 bytes long. The upper
 *     # bound of the underestimate is 10 / 65536 ~= 0.0153% of the actual size.
 *     return estimated_size, observables             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __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":647
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     estimated_size = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_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)__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;
  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, 647, __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, 647, __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, 647, __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;
  __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, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self._elem_coder,)
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self._elem_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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_elem_coder));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_elem_coder));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_elem_coder));
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

  /* "(tree fragment)":5
 *     state = (self._elem_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)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

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

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self._elem_coder is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->_elem_coder) != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = self._elem_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":11
 *         use_setstate = self._elem_coder is not None
 *     if use_setstate:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SequenceCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_116739418);
    __Pyx_GIVEREF(__pyx_int_116739418);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_116739418);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self._elem_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, None), state
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SequenceCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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_116739418);
    __Pyx_GIVEREF(__pyx_int_116739418);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_116739418);
    __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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = (self._elem_coder,)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.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)":14
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, 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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, 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":675
 *   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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_components); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_components};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_components};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 675, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_components);
          __Pyx_GIVEREF(__pyx_v_components);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_components);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":676
 * 
 *   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, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":675
 *   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_XDECREF(__pyx_t_5);
  __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;
  __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, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self._elem_coder,)
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self._elem_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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

  /* "(tree fragment)":5
 *     state = (self._elem_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)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

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

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self._elem_coder is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base._elem_coder) != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = self._elem_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":11
 *         use_setstate = self._elem_coder is not None
 *     if use_setstate:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_TupleSequenceCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_116739418);
    __Pyx_GIVEREF(__pyx_int_116739418);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_116739418);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self._elem_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, None), state
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_TupleSequenceCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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_116739418);
    __Pyx_GIVEREF(__pyx_int_116739418);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_116739418);
    __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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = (self._elem_coder,)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.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)":14
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, 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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, 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":684
 *   A coder for homogeneous iterable objects."""
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return components
 * 
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1_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(CYTHON_UNUSED 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;
  PyObject *__pyx_t_5 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_construct_from_sequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_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);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_components); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_components};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_components};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 684, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          __Pyx_INCREF(__pyx_v_components);
          __Pyx_GIVEREF(__pyx_v_components);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_components);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":685
 * 
 *   def _construct_from_sequence(self, components):
 *     return components             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_components);
  __pyx_r = __pyx_v_components;
  goto __pyx_L0;

  /* "apache_beam/coders/coder_impl.py":684
 *   A coder for homogeneous iterable objects."""
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return 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_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_1_construct_from_sequence(PyObject *__pyx_v_self, PyObject *__pyx_v_components); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1_construct_from_sequence = {"_construct_from_sequence", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1_construct_from_sequence, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_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_17IterableCoderImpl__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__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;
  __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, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self._elem_coder,)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_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_17IterableCoderImpl_2__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_2__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_IterableCoderImpl *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     cdef bint use_setstate
 *     state = (self._elem_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, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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_1, 0, ((PyObject *)__pyx_v_self->__pyx_base._elem_coder));
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

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

  /* "(tree fragment)":5
 *     state = (self._elem_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)":6
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

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

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

  /* "(tree fragment)":9
 *         use_setstate = True
 *     else:
 *         use_setstate = self._elem_coder is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, None), state
 */
  /*else*/ {
    __pyx_t_3 = (((PyObject *)__pyx_v_self->__pyx_base._elem_coder) != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":10
 *     else:
 *         use_setstate = self._elem_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":11
 *         use_setstate = self._elem_coder is not None
 *     if use_setstate:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_IterableCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_116739418);
    __Pyx_GIVEREF(__pyx_int_116739418);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_116739418);
    __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, 11, __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)":10
 *     else:
 *         use_setstate = self._elem_coder is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, None), state
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_IterableCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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_116739418);
    __Pyx_GIVEREF(__pyx_int_116739418);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_116739418);
    __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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = (self._elem_coder,)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("apache_beam.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)":14
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, 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_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_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_17IterableCoderImpl_4__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_4__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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, 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":708
 *   Coder for a PaneInfo descriptor."""
 * 
 *   def _choose_encoding(self, value):             # <<<<<<<<<<<<<<
 *     if ((value.index == 0 and value.nonspeculative_index == 0) or
 *         value.timing == windowed_value.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, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("_choose_encoding", 0);

  /* "apache_beam/coders/coder_impl.py":709
 * 
 *   def _choose_encoding(self, value):
 *     if ((value.index == 0 and value.nonspeculative_index == 0) or             # <<<<<<<<<<<<<<
 *         value.timing == windowed_value.PaneInfoTiming.UNKNOWN):
 *       return PaneInfoEncoding.FIRST
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_4) {
    goto __pyx_L5_next_or;
  } else {
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_nonspeculative_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_L5_next_or:;

  /* "apache_beam/coders/coder_impl.py":710
 *   def _choose_encoding(self, value):
 *     if ((value.index == 0 and value.nonspeculative_index == 0) or
 *         value.timing == windowed_value.PaneInfoTiming.UNKNOWN):             # <<<<<<<<<<<<<<
 *       return PaneInfoEncoding.FIRST
 *     elif (value.index == value.nonspeculative_index or
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_timing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_windowed_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PaneInfoTiming); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_UNKNOWN); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;

  /* "apache_beam/coders/coder_impl.py":709
 * 
 *   def _choose_encoding(self, value):
 *     if ((value.index == 0 and value.nonspeculative_index == 0) or             # <<<<<<<<<<<<<<
 *         value.timing == windowed_value.PaneInfoTiming.UNKNOWN):
 *       return PaneInfoEncoding.FIRST
 */
  if (__pyx_t_1) {

    /* "apache_beam/coders/coder_impl.py":711
 *     if ((value.index == 0 and value.nonspeculative_index == 0) or
 *         value.timing == windowed_value.PaneInfoTiming.UNKNOWN):
 *       return PaneInfoEncoding.FIRST             # <<<<<<<<<<<<<<
 *     elif (value.index == value.nonspeculative_index or
 *           value.timing == windowed_value.PaneInfoTiming.EARLY):
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_FIRST); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 711, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;

    /* "apache_beam/coders/coder_impl.py":709
 * 
 *   def _choose_encoding(self, value):
 *     if ((value.index == 0 and value.nonspeculative_index == 0) or             # <<<<<<<<<<<<<<
 *         value.timing == windowed_value.PaneInfoTiming.UNKNOWN):
 *       return PaneInfoEncoding.FIRST
 */
  }

  /* "apache_beam/coders/coder_impl.py":712
 *         value.timing == windowed_value.PaneInfoTiming.UNKNOWN):
 *       return PaneInfoEncoding.FIRST
 *     elif (value.index == value.nonspeculative_index or             # <<<<<<<<<<<<<<
 *           value.timing == windowed_value.PaneInfoTiming.EARLY):
 *       return PaneInfoEncoding.ONE_INDEX
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_nonspeculative_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_4) {
  } else {
    __pyx_t_1 = __pyx_t_4;
    goto __pyx_L7_bool_binop_done;
  }

  /* "apache_beam/coders/coder_impl.py":713
 *       return PaneInfoEncoding.FIRST
 *     elif (value.index == value.nonspeculative_index or
 *           value.timing == windowed_value.PaneInfoTiming.EARLY):             # <<<<<<<<<<<<<<
 *       return PaneInfoEncoding.ONE_INDEX
 *     else:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_timing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_windowed_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_PaneInfoTiming); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_EARLY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_4;
  __pyx_L7_bool_binop_done:;

  /* "apache_beam/coders/coder_impl.py":712
 *         value.timing == windowed_value.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":714
 *     elif (value.index == value.nonspeculative_index or
 *           value.timing == windowed_value.PaneInfoTiming.EARLY):
 *       return PaneInfoEncoding.ONE_INDEX             # <<<<<<<<<<<<<<
 *     else:
 *       return PaneInfoEncoding.TWO_INDICES
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ONE_INDEX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 714, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 714, __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":712
 *         value.timing == windowed_value.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":716
 *       return PaneInfoEncoding.ONE_INDEX
 *     else:
 *       return PaneInfoEncoding.TWO_INDICES             # <<<<<<<<<<<<<<
 * 
 *   def encode_to_stream(self, value, out, nested):
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_TWO_INDICES); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_6;
    goto __pyx_L0;
  }

  /* "apache_beam/coders/coder_impl.py":708
 *   Coder for a PaneInfo descriptor."""
 * 
 *   def _choose_encoding(self, value):             # <<<<<<<<<<<<<<
 *     if ((value.index == 0 and value.nonspeculative_index == 0) or
 *         value.timing == windowed_value.PaneInfoTiming.UNKNOWN):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __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":718
 *       return PaneInfoEncoding.TWO_INDICES
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     encoding_type = self._choose_encoding(value)
 *     out.write_byte(value.encoded_byte | (encoding_type << 4))
 */

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) {
  PyObject *__pyx_v_encoding_type = 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;
  unsigned char __pyx_t_8;
  int __pyx_t_9;
  int64_t __pyx_t_10;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 718, __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, 718, __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, 718, __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, 718, __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, 718, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":719
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     encoding_type = self._choose_encoding(value)             # <<<<<<<<<<<<<<
 *     out.write_byte(value.encoded_byte | (encoding_type << 4))
 *     if encoding_type == PaneInfoEncoding.FIRST:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(((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_value)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_encoding_type = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":720
 *   def encode_to_stream(self, value, out, nested):
 *     encoding_type = self._choose_encoding(value)
 *     out.write_byte(value.encoded_byte | (encoding_type << 4))             # <<<<<<<<<<<<<<
 *     if encoding_type == PaneInfoEncoding.FIRST:
 *       return
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encoded_byte); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_LshiftObjC(__pyx_v_encoding_type, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyNumber_Or(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __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_t_8 = __Pyx_PyInt_As_unsigned_char(__pyx_t_4); if (unlikely((__pyx_t_8 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 720, __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_byte(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "apache_beam/coders/coder_impl.py":721
 *     encoding_type = self._choose_encoding(value)
 *     out.write_byte(value.encoded_byte | (encoding_type << 4))
 *     if encoding_type == PaneInfoEncoding.FIRST:             # <<<<<<<<<<<<<<
 *       return
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FIRST); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_encoding_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error)
  __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, 721, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":722
 *     out.write_byte(value.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":721
 *     encoding_type = self._choose_encoding(value)
 *     out.write_byte(value.encoded_byte | (encoding_type << 4))
 *     if encoding_type == PaneInfoEncoding.FIRST:             # <<<<<<<<<<<<<<
 *       return
 *     elif encoding_type == PaneInfoEncoding.ONE_INDEX:
 */
  }

  /* "apache_beam/coders/coder_impl.py":723
 *     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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ONE_INDEX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_encoding_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error)
  __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, 723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":724
 *       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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 724, __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_10, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":723
 *     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":725
 *     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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __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, 725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_encoding_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error)
  __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, 725, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(__pyx_t_9)) {

    /* "apache_beam/coders/coder_impl.py":726
 *       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, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 726, __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_10, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":727
 *     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, 727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_t_4); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 727, __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_10, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "apache_beam/coders/coder_impl.py":725
 *     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":729
 *       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_PyString_Format(__pyx_kp_s_Invalid_PaneInfoEncoding_s, __pyx_v_encoding_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __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(0, 729, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":718
 *       return PaneInfoEncoding.TWO_INDICES
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     encoding_type = self._choose_encoding(value)
 *     out.write_byte(value.encoded_byte | (encoding_type << 4))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_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(__pyx_v_encoding_type);
  __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)__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;
  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, 718, __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, 718, __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, 718, __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, 718, __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, 718, __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, 718, __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;
  __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, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":731
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     encoded_first_byte = in_stream.read_byte()
 *     base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF]
 */

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) {
  PyObject *__pyx_v_encoded_first_byte = NULL;
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_encoding_type = 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;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 731, __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, 731, __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, 731, __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, 731, __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, 731, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":732
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     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, 732, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_encoded_first_byte = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":733
 *   def decode_from_stream(self, in_stream, nested):
 *     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
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_windowed_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_BYTE_TO_PANE_INFO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_AndObjC(__pyx_v_encoded_first_byte, __pyx_int_15, 0xF, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 733, __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_v_base = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "apache_beam/coders/coder_impl.py":734
 *     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(!Py_OptimizeFlag)) {
    __pyx_t_9 = (__pyx_v_base != Py_None);
    if (unlikely(!(__pyx_t_9 != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(0, 734, __pyx_L1_error)
    }
  }
  #endif

  /* "apache_beam/coders/coder_impl.py":735
 *     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_t_4 = __Pyx_PyInt_RshiftObjC(__pyx_v_encoded_first_byte, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_encoding_type = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "apache_beam/coders/coder_impl.py":736
 *     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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_FIRST); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_encoding_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 736, __pyx_L1_error)
  __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, 736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":737
 *     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":736
 *     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":738
 *     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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ONE_INDEX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_encoding_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 738, __pyx_L1_error)
  __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, 738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":739
 *       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, 739, __pyx_L1_error)
    __pyx_v_index = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":740
 *     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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_timing); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_windowed_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PaneInfoTiming); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __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_EARLY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 740, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":741
 *       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":740
 *     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":743
 *         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":738
 *     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":744
 *       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_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TWO_INDICES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_encoding_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(__pyx_t_9)) {

    /* "apache_beam/coders/coder_impl.py":745
 *         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, 745, __pyx_L1_error)
    __pyx_v_index = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":746
 *     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, 746, __pyx_L1_error)
    __pyx_v_nonspeculative_index = __pyx_t_10;

    /* "apache_beam/coders/coder_impl.py":744
 *       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":748
 *       nonspeculative_index = in_stream.read_var_int64()
 *     else:
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)             # <<<<<<<<<<<<<<
 *     return windowed_value.PaneInfo(
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_PaneInfoEncoding_s, __pyx_v_encoding_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __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, 748, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":749
 *     else:
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 *     return windowed_value.PaneInfo(             # <<<<<<<<<<<<<<
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_windowed_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PaneInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":750
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 *     return windowed_value.PaneInfo(
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)             # <<<<<<<<<<<<<<
 * 
 *   def estimate_size(self, value, nested=False):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_is_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_is_last); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_base, __pyx_n_s_timing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_int64_t(__pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_PyInt_From_int64_t(__pyx_v_nonspeculative_index); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[6] = {__pyx_t_12, __pyx_t_2, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_11};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[6] = {__pyx_t_12, __pyx_t_2, __pyx_t_7, __pyx_t_3, __pyx_t_5, __pyx_t_11};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else
  #endif
  {
    __pyx_t_13 = PyTuple_New(5+__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (__pyx_t_12) {
      __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_6, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_6, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_6, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_6, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_11);
    PyTuple_SET_ITEM(__pyx_t_13, 4+__pyx_t_6, __pyx_t_11);
    __pyx_t_2 = 0;
    __pyx_t_7 = 0;
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_11 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __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":731
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     encoded_first_byte = in_stream.read_byte()
 *     base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __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_encoded_first_byte);
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_encoding_type);
  __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)__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;
  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, 731, __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, 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_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, 731, __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, 731, __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, 731, __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;
  __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, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":752
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     size = 1
 */

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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_estimate_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_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, 752, __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, 752, __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, 752, __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, 752, __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, 752, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":754
 *   def estimate_size(self, value, nested=False):
 *     """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":755
 *     """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)
 */
  __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_value);

  /* "apache_beam/coders/coder_impl.py":756
 *     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, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __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, 756, __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, 756, __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, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":757
 *     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, 757, __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);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 757, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __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_t_1 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __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":756
 *     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":758
 *     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, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PaneInfoEncoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TWO_INDICES); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "apache_beam/coders/coder_impl.py":759
 *       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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
    __pyx_t_1 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_4 = 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);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 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_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 759, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __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":760
 *     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, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size);
    __pyx_t_7 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_size, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "apache_beam/coders/coder_impl.py":758
 *     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":761
 *       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":752
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     size = 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.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)__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;
  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, 752, __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, 752, __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, 752, __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;
  __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, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = ()
 */

/* 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) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

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

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

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

  /* "(tree fragment)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_PaneInfoCoderImpl); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __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)":10
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_PaneInfoCoderImpl, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":13
 *         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_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_PaneInfoCoderImpl); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_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 bint use_setstate
 *     state = ()
 */

  /* 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)":14
 *     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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":773
 *   # TODO(BEAM-1524): 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 - (1 << 63)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1_to_normal_time(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time[] = "Convert \"lexicographically ordered unsigned\" to signed.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1_to_normal_time = {"_to_normal_time", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1_to_normal_time, METH_O, __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1_to_normal_time(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_to_normal_time (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_to_normal_time", 0);

  /* "apache_beam/coders/coder_impl.py":775
 *   def _to_normal_time(self, value):
 *     """Convert "lexicographically ordered unsigned" to signed."""
 *     return value - (1 << 63)             # <<<<<<<<<<<<<<
 * 
 *   def _from_normal_time(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_value, __pyx_int_9223372036854775808); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __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":773
 *   # TODO(BEAM-1524): 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 - (1 << 63)
 */

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

/* "apache_beam/coders/coder_impl.py":777
 *     return value - (1 << 63)
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3_from_normal_time(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2_from_normal_time[] = "Convert signed to \"lexicographically ordered unsigned\".";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3_from_normal_time = {"_from_normal_time", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3_from_normal_time, METH_O, __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2_from_normal_time};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3_from_normal_time(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_normal_time (wrapper)", 0);
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2_from_normal_time(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2_from_normal_time(CYTHON_UNUSED struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_from_normal_time", 0);

  /* "apache_beam/coders/coder_impl.py":779
 *   def _from_normal_time(self, value):
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self, value_coder, timestamp_coder, window_coder):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyNumber_Add(__pyx_v_value, __pyx_int_9223372036854775808); 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;

  /* "apache_beam/coders/coder_impl.py":777
 *     return value - (1 << 63)
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)
 */

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

/* "apache_beam/coders/coder_impl.py":781
 *     return value + (1 << 63)
 * 
 *   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_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_5__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_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, 781, __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, 781, __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, 781, __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, 781, __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_4__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_4__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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":783
 *   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, 783, __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":784
 *     # 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, 784, __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":785
 *     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, 785, __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":786
 *     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, 786, __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":781
 *     return value + (1 << 63)
 * 
 *   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":788
 *     self._pane_info_coder = PaneInfoCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     wv = value  # type cast
 *     # Avoid creation of Timestamp object.
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7encode_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;
  PyObject *__pyx_v_restore_sign = 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;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_encode_to_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7encode_to_stream)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 788, __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, 788, __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, 788, __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, 788, __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, 788, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":789
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     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, 789, __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":791
 *     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_INCREF(__pyx_int_neg_1);
    __pyx_t_1 = __pyx_int_neg_1;
  } else {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_1 = __pyx_int_1;
  }
  __pyx_v_restore_sign = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":798
 *         # TODO(BEAM-1524): Clean this up once we have a BEAM wide consensus on
 *         # precision of timestamps.
 *         self._from_normal_time(             # <<<<<<<<<<<<<<
 *             restore_sign * (abs(wv.timestamp_micros) // 1000)))
 *     self._windows_coder.encode_to_stream(wv.windows, out, True)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_normal_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/coders/coder_impl.py":799
 *         # precision of timestamps.
 *         self._from_normal_time(
 *             restore_sign * (abs(wv.timestamp_micros) // 1000)))             # <<<<<<<<<<<<<<
 *     self._windows_coder.encode_to_stream(wv.windows, out, True)
 *     # Default PaneInfo encoded byte representing NO_FIRING.
 */
  __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_v_wv->timestamp_micros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyNumber_Absolute(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_7, __pyx_int_1000, 0x3E8, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyNumber_Multiply(__pyx_v_restore_sign, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_7};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":798
 *         # TODO(BEAM-1524): Clean this up once we have a BEAM wide consensus on
 *         # precision of timestamps.
 *         self._from_normal_time(             # <<<<<<<<<<<<<<
 *             restore_sign * (abs(wv.timestamp_micros) // 1000)))
 *     self._windows_coder.encode_to_stream(wv.windows, out, True)
 */
  __pyx_t_8 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_8 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":792
 *     # Avoid creation of Timestamp object.
 *     restore_sign = -1 if wv.timestamp_micros < 0 else 1
 *     out.write_bigendian_uint64(             # <<<<<<<<<<<<<<
 *         # Convert to postive number and divide, since python rounds off to the
 *         # lower negative number. For ex: -3 / 2 = -2, but we expect it to be -1,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_11apache_beam_6coders_6stream_OutputStream *)__pyx_v_out->__pyx_vtab)->write_bigendian_uint64(__pyx_v_out, __pyx_t_8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":800
 *         self._from_normal_time(
 *             restore_sign * (abs(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, 800, __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":802
 *     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, 802, __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":803
 *     # 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, 803, __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":788
 *     self._pane_info_coder = PaneInfoCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     wv = value  # type cast
 *     # Avoid creation of Timestamp object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(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_XDECREF(__pyx_v_restore_sign);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7encode_to_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7encode_to_stream = {"encode_to_stream", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7encode_to_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_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;
  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, 788, __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, 788, __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, 788, __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, 788, __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, 788, __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, 788, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_6encode_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_6encode_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;
  __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, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":805
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     timestamp = self._to_normal_time(in_stream.read_bigendian_uint64())
 *     # Restore MIN/MAX timestamps to their actual values as encoding incurs loss
 */

static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9decode_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) {
  PyObject *__pyx_v_timestamp = NULL;
  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;
  int64_t __pyx_t_10;
  struct __pyx_opt_args_11apache_beam_5utils_14windowed_value_create __pyx_t_11;
  __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)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decode_from_stream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9decode_from_stream)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __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, 805, __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, 805, __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, 805, __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, 805, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":806
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_normal_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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, 806, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __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);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __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[2] = {__pyx_t_7, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __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_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4);
      __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, 806, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_timestamp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":813
 *     # TODO(BEAM-1524): 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MIN_TIMESTAMP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __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, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Absolute(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_1, __pyx_int_1000, 0x3E8, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __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, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_timestamp, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":814
 *     # 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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MIN_TIMESTAMP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __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, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_timestamp, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":813
 *     # TODO(BEAM-1524): 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":815
 *     if timestamp == -(abs(MIN_TIMESTAMP.micros) // 1000):
 *       timestamp = MIN_TIMESTAMP.micros
 *     elif timestamp == (MAX_TIMESTAMP.micros // 1000):             # <<<<<<<<<<<<<<
 *       timestamp = MAX_TIMESTAMP.micros
 *     else:
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MAX_TIMESTAMP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __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, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_2, __pyx_int_1000, 0x3E8, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_timestamp, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {

    /* "apache_beam/coders/coder_impl.py":816
 *       timestamp = MIN_TIMESTAMP.micros
 *     elif timestamp == (MAX_TIMESTAMP.micros // 1000):
 *       timestamp = MAX_TIMESTAMP.micros             # <<<<<<<<<<<<<<
 *     else:
 *       timestamp *= 1000
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MAX_TIMESTAMP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __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, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_timestamp, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":815
 *     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":818
 *       timestamp = MAX_TIMESTAMP.micros
 *     else:
 *       timestamp *= 1000             # <<<<<<<<<<<<<<
 *       if timestamp > MAX_TIMESTAMP.micros:
 *         timestamp = MAX_TIMESTAMP.micros
 */
  /*else*/ {
    __pyx_t_1 = PyNumber_InPlaceMultiply(__pyx_v_timestamp, __pyx_int_1000); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_timestamp, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "apache_beam/coders/coder_impl.py":819
 *     else:
 *       timestamp *= 1000
 *       if timestamp > MAX_TIMESTAMP.micros:             # <<<<<<<<<<<<<<
 *         timestamp = MAX_TIMESTAMP.micros
 *       if timestamp < MIN_TIMESTAMP.micros:
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MAX_TIMESTAMP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __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, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_timestamp, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
    __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, 819, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":820
 *       timestamp *= 1000
 *       if timestamp > MAX_TIMESTAMP.micros:
 *         timestamp = MAX_TIMESTAMP.micros             # <<<<<<<<<<<<<<
 *       if timestamp < MIN_TIMESTAMP.micros:
 *         timestamp = MIN_TIMESTAMP.micros
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MAX_TIMESTAMP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __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, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_timestamp, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":819
 *     else:
 *       timestamp *= 1000
 *       if timestamp > MAX_TIMESTAMP.micros:             # <<<<<<<<<<<<<<
 *         timestamp = MAX_TIMESTAMP.micros
 *       if timestamp < MIN_TIMESTAMP.micros:
 */
    }

    /* "apache_beam/coders/coder_impl.py":821
 *       if timestamp > MAX_TIMESTAMP.micros:
 *         timestamp = MAX_TIMESTAMP.micros
 *       if timestamp < MIN_TIMESTAMP.micros:             # <<<<<<<<<<<<<<
 *         timestamp = MIN_TIMESTAMP.micros
 * 
 */
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MIN_TIMESTAMP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __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, 821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_timestamp, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 821, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_9) {

      /* "apache_beam/coders/coder_impl.py":822
 *         timestamp = MAX_TIMESTAMP.micros
 *       if timestamp < MIN_TIMESTAMP.micros:
 *         timestamp = MIN_TIMESTAMP.micros             # <<<<<<<<<<<<<<
 * 
 *     windows = self._windows_coder.decode_from_stream(in_stream, True)
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MIN_TIMESTAMP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __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, 822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_timestamp, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":821
 *       if timestamp > MAX_TIMESTAMP.micros:
 *         timestamp = MAX_TIMESTAMP.micros
 *       if timestamp < MIN_TIMESTAMP.micros:             # <<<<<<<<<<<<<<
 *         timestamp = MIN_TIMESTAMP.micros
 * 
 */
    }
  }
  __pyx_L3:;

  /* "apache_beam/coders/coder_impl.py":824
 *         timestamp = MIN_TIMESTAMP.micros
 * 
 *     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, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_windows = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":826
 *     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, 826, __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":827
 *     # 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, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":828
 *     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,
 *         # Avoid creation of Timestamp object.
 */
  __Pyx_XDECREF(__pyx_r);

  /* "apache_beam/coders/coder_impl.py":831
 *         value,
 *         # Avoid creation of Timestamp object.
 *         timestamp,             # <<<<<<<<<<<<<<
 *         windows,
 *         pane_info)
 */
  __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_timestamp); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 831, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":828
 *     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,
 *         # Avoid creation of Timestamp object.
 */
  __pyx_t_11.__pyx_n = 1;
  __pyx_t_11.pane_info = __pyx_v_pane_info;
  __pyx_t_1 = ((PyObject *)__pyx_f_11apache_beam_5utils_14windowed_value_create(__pyx_v_value, __pyx_t_10, __pyx_v_windows, 0, &__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __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":805
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     timestamp = self._to_normal_time(in_stream.read_bigendian_uint64())
 *     # Restore MIN/MAX timestamps to their actual values as encoding incurs loss
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__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_timestamp);
  __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_9decode_from_stream(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9decode_from_stream = {"decode_from_stream", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9decode_from_stream, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_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;
  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, 805, __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, 805, __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, 805, __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, 805, __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, 805, __pyx_L1_error)
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_8decode_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_8decode_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;
  __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, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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":835
 *         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_22WindowedValueCoderImpl_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_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;
  __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)) {
    __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, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_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, 835, __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, 835, __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, 835, __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, 835, __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, 835, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "apache_beam/coders/coder_impl.py":837
 *   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_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_observable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __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, 837, __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, 837, __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":840
 *       # 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, 840, __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, 840, __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, 840, __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":837
 *   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":841
 *       # 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":842
 *       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, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_observables = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":845
 *     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, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "apache_beam/coders/coder_impl.py":844
 *     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, 844, __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, 843, __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, 843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __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, 843, __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, 843, __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, 843, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }

  /* "apache_beam/coders/coder_impl.py":843
 *     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":846
 *         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, 846, __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":847
 *             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, 847, __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":849
 *     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, 849, __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, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":848
 *     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, 848, __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":851
 *         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, 851, __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, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":850
 *     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, 850, __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":853
 *         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, 853, __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, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":852
 *     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, 852, __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":854
 *     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, 854, __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":835
 *         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.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_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_22WindowedValueCoderImpl_10get_estimated_size_and_observables[] = "Returns estimated size of value along with any nested observables.";
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11get_estimated_size_and_observables = {"get_estimated_size_and_observables", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11get_estimated_size_and_observables, METH_VARARGS|METH_KEYWORDS, __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_10get_estimated_size_and_observables};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11get_estimated_size_and_observables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  int __pyx_v_nested;
  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, 835, __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, 835, __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, 835, __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_10get_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_10get_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;
  __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, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_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 bint use_setstate
 *     state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder)
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_13__reduce_cython__, METH_NOARGS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_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_22WindowedValueCoderImpl_12__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_12__reduce_cython__(struct __pyx_obj_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl *__pyx_v_self) {
  int __pyx_v_use_setstate;
  PyObject *__pyx_v_state = NULL;
  PyObject *__pyx_v__dict = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     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, 3, __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)":4
 *     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, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

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

    /* "(tree fragment)":7
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._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)":5
 *     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)":9
 *         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)":10
 *     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)":11
 *         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_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_WindowedValueCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":10
 *     else:
 *         use_setstate = self._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)":13
 *         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_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_WindowedValueCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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(__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, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder)
 */

  /* 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)":14
 *     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_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_15__setstate_cython__, METH_O, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_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_22WindowedValueCoderImpl_14__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_14__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;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_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":862
 *   Coder which prefixes the length of the encoded object in the stream."""
 * 
 *   def __init__(self, value_coder):             # <<<<<<<<<<<<<<
 *     self._value_coder = value_coder
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__ = {"__init__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value_coder = 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, 862, __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, 862, __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, 862, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__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_21LengthPrefixCoderImpl___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_21LengthPrefixCoderImpl___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value_coder) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "apache_beam/coders/coder_impl.py":863
 * 
 *   def __init__(self, value_coder):
 *     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, 863, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":862
 *   Coder which prefixes the length of the encoded object in the stream."""
 * 
 *   def __init__(self, value_coder):             # <<<<<<<<<<<<<<
 *     self._value_coder = value_coder
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.__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":865
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     encoded_value = self._value_coder.encode(value)
 *     out.write_var_int64(len(encoded_value))
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream(PyObject *__pyx_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)__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_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;
  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, 865, __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, 865, __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, 865, __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, 865, __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, 865, __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:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_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_21LengthPrefixCoderImpl_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_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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("encode_to_stream", 0);

  /* "apache_beam/coders/coder_impl.py":866
 * 
 *   def encode_to_stream(self, value, out, nested):
 *     encoded_value = self._value_coder.encode(value)             # <<<<<<<<<<<<<<
 *     out.write_var_int64(len(encoded_value))
 *     out.write(encoded_value)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value_coder_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_encoded_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":867
 *   def encode_to_stream(self, value, out, nested):
 *     encoded_value = self._value_coder.encode(value)
 *     out.write_var_int64(len(encoded_value))             # <<<<<<<<<<<<<<
 *     out.write(encoded_value)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_write_var_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_Length(__pyx_v_encoded_value); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 867, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __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":868
 *     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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 868, __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);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_encoded_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_encoded_value};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __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_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_encoded_value};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v_encoded_value);
      __Pyx_GIVEREF(__pyx_v_encoded_value);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_encoded_value);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":865
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     encoded_value = self._value_coder.encode(value)
 *     out.write_var_int64(len(encoded_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_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.LengthPrefixCoderImpl.encode_to_stream", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encoded_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "apache_beam/coders/coder_impl.py":870
 *     out.write(encoded_value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value_length = in_stream.read_var_int64()
 *     return self._value_coder.decode(in_stream.read(value_length))
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream(PyObject *__pyx_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)__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_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;
  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, 870, __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, 870, __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, 870, __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, 870, __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:;
  __pyx_r = __pyx_pf_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_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_21LengthPrefixCoderImpl_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_value_length = 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;
  __Pyx_RefNannySetupContext("decode_from_stream", 0);

  /* "apache_beam/coders/coder_impl.py":871
 * 
 *   def decode_from_stream(self, in_stream, nested):
 *     value_length = in_stream.read_var_int64()             # <<<<<<<<<<<<<<
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_stream, __pyx_n_s_read_var_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_value_length = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":872
 *   def decode_from_stream(self, in_stream, nested):
 *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value_coder_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_in_stream, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_value_length};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_value_length};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_value_length);
      __Pyx_GIVEREF(__pyx_v_value_length);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_value_length);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __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_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __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[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __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(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __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+1, __pyx_t_2);
      __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, 872, __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":870
 *     out.write(encoded_value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value_length = in_stream.read_var_int64()
 *     return self._value_coder.decode(in_stream.read(value_length))
 */

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

/* "apache_beam/coders/coder_impl.py":874
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     value_size = self._value_coder.estimate_size(value)
 *     return get_varint_size(value_size) + value_size
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size = {"estimate_size", (PyCFunction)__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_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_nested = 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, 874, __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, 874, __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, 874, __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(__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_21LengthPrefixCoderImpl_6estimate_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_nested) {
  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;
  __Pyx_RefNannySetupContext("estimate_size", 0);

  /* "apache_beam/coders/coder_impl.py":875
 * 
 *   def estimate_size(self, value, nested=False):
 *     value_size = self._value_coder.estimate_size(value)             # <<<<<<<<<<<<<<
 *     return get_varint_size(value_size) + value_size
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value_coder_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __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, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_value};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_value_size = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":876
 *   def estimate_size(self, value, nested=False):
 *     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_3 = __pyx_v_11apache_beam_6coders_10coder_impl_get_varint_size; __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value_size};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_value_size};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_value_size);
      __Pyx_GIVEREF(__pyx_v_value_size);
      PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_value_size);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_value_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __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":874
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     value_size = self._value_coder.estimate_size(value)
 *     return get_varint_size(value_size) + value_size
 */

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

/* "(tree fragment)":1
 * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_1__pyx_unpickle_CoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_1__pyx_unpickle_CoderImpl = {"__pyx_unpickle_CoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_1__pyx_unpickle_CoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_1__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;
  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___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___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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __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, 10, __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, 10, __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)":11
 * 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, 11, __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, 11, __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, 11, __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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":10
 *     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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_3__pyx_unpickle_SimpleCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_3__pyx_unpickle_SimpleCoderImpl = {"__pyx_unpickle_SimpleCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_3__pyx_unpickle_SimpleCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_3__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;
  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_2__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_2__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_SimpleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SimpleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_SimpleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SimpleCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __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, 10, __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, 10, __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)":11
 * 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, 11, __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, 11, __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, 11, __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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":10
 *     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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_5__pyx_unpickle_StreamCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_5__pyx_unpickle_StreamCoderImpl = {"__pyx_unpickle_StreamCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_5__pyx_unpickle_StreamCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_5__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;
  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_4__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_4__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StreamCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = StreamCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_StreamCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __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, 10, __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, 10, __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)":11
 * 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, 11, __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, 11, __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, 11, __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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":10
 *     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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd79bc1f:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_7__pyx_unpickle_CallbackCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_7__pyx_unpickle_CallbackCoderImpl = {"__pyx_unpickle_CallbackCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_7__pyx_unpickle_CallbackCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_7__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;
  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_6__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_6__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CallbackCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_CallbackCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd79bc1f:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd79bc1f = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd79bc1f) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_CallbackCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd79bc1f:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd79bc1f = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)
 *     __pyx_result = CallbackCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xd79bc1f:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd79bc1f = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = CallbackCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd7, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_CallbackCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd79bc1f:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd79bc1f = (_decoder, _encoder, _size_estimator))" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd79bc1f = (_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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd79bc1f:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_CallbackCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __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)":11
 * 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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result._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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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_DeterministicFastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x0f41539:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_DeterministicFastPrimitivesCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_DeterministicFastPrimitivesCoderImpl = {"__pyx_unpickle_DeterministicFastPrimitivesCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_DeterministicFastPrimitivesCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_DeterministicFastPrimitivesCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_DeterministicFastPrimitivesCoderImpl (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_DeterministicFastPrimitivesCoderImpl", 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_DeterministicFastPrimitivesCoderImpl", 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_DeterministicFastPrimitivesCoderImpl") < 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_DeterministicFastPrimitivesCoderImpl", 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_DeterministicFastPrimitivesCoderImpl", __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_DeterministicFastPrimitivesCoderImpl(__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_DeterministicFastPrimitivesCoderImpl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DeterministicFastPrimitivesCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_DeterministicFastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x0f41539:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f41539 = (_step_label, _underlying_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0f41539) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_DeterministicFastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x0f41539:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f41539 = (_step_label, _underlying_coder))" % __pyx_checksum)
 *     __pyx_result = DeterministicFastPrimitivesCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x0f41539:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f41539 = (_step_label, _underlying_coder))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = DeterministicFastPrimitivesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x0f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_DeterministicFastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x0f41539:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f41539 = (_step_label, _underlying_coder))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":5
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f41539 = (_step_label, _underlying_coder))" % __pyx_checksum)
 *     __pyx_result = DeterministicFastPrimitivesCoderImpl.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(<DeterministicFastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_v___pyx_type);
      __Pyx_GIVEREF(__pyx_v___pyx_type);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f41539 = (_step_label, _underlying_coder))" % __pyx_checksum)
 *     __pyx_result = DeterministicFastPrimitivesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(<DeterministicFastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

    /* "(tree fragment)":7
 *     __pyx_result = DeterministicFastPrimitivesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(<DeterministicFastPrimitivesCoderImpl> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(DeterministicFastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 7, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_11apache_beam_6coders_10coder_impl___pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(((struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x0f41539 = (_step_label, _underlying_coder))" % __pyx_checksum)
 *     __pyx_result = DeterministicFastPrimitivesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(<DeterministicFastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":8
 *     if __pyx_state is not None:
 *         __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(<DeterministicFastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(DeterministicFastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._step_label = __pyx_state[0]; __pyx_result._underlying_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_DeterministicFastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x0f41539:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_DeterministicFastPrimitivesCoderImpl", __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)":9
 *         __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(<DeterministicFastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(DeterministicFastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._step_label = __pyx_state[0]; __pyx_result._underlying_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_DeterministicFastPrimitivesCoderImpl__set_state(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *__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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     return __pyx_result
 * cdef __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(DeterministicFastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._step_label = __pyx_state[0]; __pyx_result._underlying_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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_step_label);
  __Pyx_DECREF(__pyx_v___pyx_result->_step_label);
  __pyx_v___pyx_result->_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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_underlying_coder);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_underlying_coder));
  __pyx_v___pyx_result->_underlying_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":11
 * cdef __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(DeterministicFastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._step_label = __pyx_state[0]; __pyx_result._underlying_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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result._step_label = __pyx_state[0]; __pyx_result._underlying_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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(DeterministicFastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._step_label = __pyx_state[0]; __pyx_result._underlying_coder = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":9
 *         __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(<DeterministicFastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(DeterministicFastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._step_label = __pyx_state[0]; __pyx_result._underlying_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_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("apache_beam.coders.coder_impl.__pyx_unpickle_DeterministicFastPrimitivesCoderImpl__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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x777bafb:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_11__pyx_unpickle_FastPrimitivesCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_11__pyx_unpickle_FastPrimitivesCoderImpl = {"__pyx_unpickle_FastPrimitivesCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_11__pyx_unpickle_FastPrimitivesCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_11__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;
  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_10__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_10__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FastPrimitivesCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_FastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x777bafb:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x777bafb = (fallback_coder_impl))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x777bafb) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x777bafb:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x777bafb = (fallback_coder_impl))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = FastPrimitivesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x77, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_FastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x777bafb:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x777bafb = (fallback_coder_impl))" % __pyx_checksum)
 */
  }

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

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x777bafb = (fallback_coder_impl))" % __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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x777bafb = (fallback_coder_impl))" % __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)":8
 *     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_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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x777bafb:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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]
 *     if len(__pyx_state) > 1 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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FastPrimitivesCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     return __pyx_result
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.fallback_coder_impl = __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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 10, __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;

  /* "(tree fragment)":11
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.fallback_coder_impl = __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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result.fallback_coder_impl = __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_FastPrimitivesCoderImpl__set_state(FastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result.fallback_coder_impl = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":9
 *         __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]
 *     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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13__pyx_unpickle_BytesCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_13__pyx_unpickle_BytesCoderImpl = {"__pyx_unpickle_BytesCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_13__pyx_unpickle_BytesCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_13__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;
  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_12__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_12__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BytesCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_BytesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = BytesCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_BytesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_BytesCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __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, 10, __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, 10, __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)":11
 * 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, 11, __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, 11, __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, 11, __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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":10
 *     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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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_FloatCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_FloatCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_FloatCoderImpl = {"__pyx_unpickle_FloatCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_FloatCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_15__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;
  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_14__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_14__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_FloatCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = FloatCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_FloatCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_FloatCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __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, 10, __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, 10, __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)":11
 * 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, 11, __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, 11, __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, 11, __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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":10
 *     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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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_TimestampCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x11860ce:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_TimestampCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_TimestampCoderImpl = {"__pyx_unpickle_TimestampCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_TimestampCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_17__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;
  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_16__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_16__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x11860ce:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x11860ce = (timestamp_class))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x11860ce) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x11860ce:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x11860ce = (timestamp_class))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TimestampCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x11, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x11860ce:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x11860ce = (timestamp_class))" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x11860ce = (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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x11860ce:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TimestampCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __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)":11
 * 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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result.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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_VarIntCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_VarIntCoderImpl = {"__pyx_unpickle_VarIntCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_VarIntCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_19__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;
  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_18__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_18__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_VarIntCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_VarIntCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = VarIntCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_VarIntCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_VarIntCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __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, 10, __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, 10, __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)":11
 * 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, 11, __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, 11, __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, 11, __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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":10
 *     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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xe106c97:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_SingletonCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_SingletonCoderImpl = {"__pyx_unpickle_SingletonCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_SingletonCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_21__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;
  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_20__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_20__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_SingletonCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xe106c97:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe106c97 = (_value))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xe106c97) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xe106c97:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe106c97 = (_value))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SingletonCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xe1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_SingletonCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xe106c97:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe106c97 = (_value))" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xe106c97 = (_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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xe106c97:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SingletonCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __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)":11
 * 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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result._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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x56b63b6:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_AbstractComponentCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_AbstractComponentCoderImpl = {"__pyx_unpickle_AbstractComponentCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_AbstractComponentCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_23__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;
  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_22__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_22__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_AbstractComponentCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_AbstractComponentCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x56b63b6:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x56b63b6 = (_coder_impls))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x56b63b6) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x56b63b6:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x56b63b6 = (_coder_impls))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = AbstractComponentCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_AbstractComponentCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x56b63b6:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x56b63b6 = (_coder_impls))" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x56b63b6 = (_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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x56b63b6:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_AbstractComponentCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 10, __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)":11
 * 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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result._coder_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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x56b63b6:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_TupleCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_TupleCoderImpl = {"__pyx_unpickle_TupleCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_TupleCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_25__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;
  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_24__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_24__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_TupleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x56b63b6:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x56b63b6 = (_coder_impls))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x56b63b6) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x56b63b6:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x56b63b6 = (_coder_impls))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TupleCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_TupleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x56b63b6:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x56b63b6 = (_coder_impls))" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x56b63b6 = (_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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x56b63b6:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 10, __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)":11
 * 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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result._coder_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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_SequenceCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_SequenceCoderImpl = {"__pyx_unpickle_SequenceCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_SequenceCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_27__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;
  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_26__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_26__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SequenceCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_SequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x6f54d5a:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x6f54d5a) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = SequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_SequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x6f54d5a:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __pyx_checksum)
 */
  }

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

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __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)":8
 *     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_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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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]
 *     if len(__pyx_state) > 1 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;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_SequenceCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     return __pyx_result
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 10, __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;

  /* "(tree fragment)":11
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result._elem_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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_SequenceCoderImpl__set_state(SequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":9
 *         __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]
 *     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_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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_TupleSequenceCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_TupleSequenceCoderImpl = {"__pyx_unpickle_TupleSequenceCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_TupleSequenceCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_29__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;
  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_28__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_28__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleSequenceCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_TupleSequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x6f54d5a:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x6f54d5a) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = TupleSequenceCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_TupleSequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x6f54d5a:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __pyx_checksum)
 */
  }

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

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __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)":8
 *     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_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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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]
 *     if len(__pyx_state) > 1 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;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_TupleSequenceCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     return __pyx_result
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 10, __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;

  /* "(tree fragment)":11
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result._elem_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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_TupleSequenceCoderImpl__set_state(TupleSequenceCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":9
 *         __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]
 *     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_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_IterableCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_IterableCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_IterableCoderImpl = {"__pyx_unpickle_IterableCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_IterableCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_31__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;
  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_30__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_30__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IterableCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_IterableCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x6f54d5a:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x6f54d5a) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = IterableCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_IterableCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x6f54d5a:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __pyx_checksum)
 */
  }

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

  /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __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_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x6f54d5a = (_elem_coder))" % __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)":8
 *     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_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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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]
 *     if len(__pyx_state) > 1 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;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_IterableCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     return __pyx_result
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 10, __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;

  /* "(tree fragment)":11
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result._elem_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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_IterableCoderImpl__set_state(IterableCoderImpl __pyx_result, tuple __pyx_state):
 *     __pyx_result._elem_coder = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":9
 *         __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]
 *     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_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_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_PaneInfoCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_PaneInfoCoderImpl = {"__pyx_unpickle_PaneInfoCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_PaneInfoCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_33__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;
  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_32__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_32__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_PaneInfoCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
  if (__pyx_t_1) {

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

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = PaneInfoCoderImpl.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0xd41d8cd:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_PaneInfoCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __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, 10, __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, 10, __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)":11
 * 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, 11, __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, 11, __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, 11, __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, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_5);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":10
 *     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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x7f7a287:
 *         from pickle import PickleError as __pyx_PickleError
 */

/* Python wrapper */
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_WindowedValueCoderImpl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_WindowedValueCoderImpl = {"__pyx_unpickle_WindowedValueCoderImpl", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_WindowedValueCoderImpl, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_11apache_beam_6coders_10coder_impl_35__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;
  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_34__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_34__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 = NULL;
  PyObject *__pyx_v___pyx_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedValueCoderImpl", 0);

  /* "(tree fragment)":2
 * def __pyx_unpickle_WindowedValueCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x7f7a287:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f7a287 = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x7f7a287) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":3
 * def __pyx_unpickle_WindowedValueCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x7f7a287:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f7a287 = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)
 *     __pyx_result = WindowedValueCoderImpl.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":4
 *     if __pyx_checksum != 0x7f7a287:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f7a287 = (_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_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x7f, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 4, __pyx_L1_error)

    /* "(tree fragment)":2
 * def __pyx_unpickle_WindowedValueCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):
 *     if __pyx_checksum != 0x7f7a287:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f7a287 = (_pane_info_coder, _timestamp_coder, _value_coder, _windows_coder))" % __pyx_checksum)
 */
  }

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

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

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

    /* "(tree fragment)":6
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x7f7a287 = (_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)":8
 *     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):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x7f7a287:
 *         from pickle import PickleError as __pyx_PickleError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("apache_beam.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)":9
 *         __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;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__pyx_unpickle_WindowedValueCoderImpl__set_state", 0);

  /* "(tree fragment)":10
 *     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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 10, __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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 10, __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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 10, __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, 10, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl))))) __PYX_ERR(1, 10, __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)":11
 * 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, 11, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __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, 11, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":12
 *     __pyx_result._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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 12, __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, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_8) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":11
 * cdef __pyx_unpickle_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)":9
 *         __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_XDECREF(__pyx_t_9);
  __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;
}
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)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_CoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_19__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_9CoderImpl_21__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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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) && !_PyGC_FINALIZED(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 CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  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_17__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
static struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl __pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl;

static PyObject *__pyx_tp_new_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *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_DeterministicFastPrimitivesCoderImpl *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_11apache_beam_6coders_10coder_impl_CoderImpl*)__pyx_vtabptr_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl;
  p->_underlying_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  p->_step_label = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl(PyObject *o) {
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_underlying_coder);
  Py_CLEAR(p->_step_label);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_CoderImpl(o);
}

static int __pyx_tp_traverse_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)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_DeterministicFastPrimitivesCoderImpl)); if (e) return e;
  if (p->_underlying_coder) {
    e = (*v)(((PyObject *)p->_underlying_coder), a); if (e) return e;
  }
  if (p->_step_label) {
    e = (*v)(p->_step_label, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *p = (struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *)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_DeterministicFastPrimitivesCoderImpl);
  tmp = ((PyObject*)p->_underlying_coder);
  p->_underlying_coder = ((struct __pyx_obj_11apache_beam_6coders_10coder_impl_CoderImpl *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_step_label);
  p->_step_label = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_15__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_17__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl = {
  PyVarObject_HEAD_INIT(0, 0)
  "apache_beam.coders.coder_impl.DeterministicFastPrimitivesCoderImpl", /*tp_name*/
  sizeof(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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_DeterministicFastPrimitivesCoderImpl, /*tp_traverse*/
  __pyx_tp_clear_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl, /*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_36DeterministicFastPrimitivesCoderImpl_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_11apache_beam_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);
  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) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->fallback_coder_impl);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  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;
  }
  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);
  return 0;
}

static PyMethodDef __pyx_methods_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11__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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->timestamp_class);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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_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
};
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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "For internal use only; no backwards-compatibility guarantees.\n\n  A coder for long/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
};
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) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_value);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_coder_impls);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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);
  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) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_elem_coder);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  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;
  }
  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);
  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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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  ", /*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
};
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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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*/
  #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_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
};
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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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
};
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) && !_PyGC_FINALIZED(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 CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  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[] = {
  {"_to_normal_time", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1_to_normal_time, METH_O, __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl__to_normal_time},
  {"_from_normal_time", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3_from_normal_time, METH_O, __pyx_doc_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_2_from_normal_time},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_15__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*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_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_5__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
};

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

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__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_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_BYTE_TO_PANE_INFO, __pyx_k_BYTE_TO_PANE_INFO, sizeof(__pyx_k_BYTE_TO_PANE_INFO), 0, 0, 1, 1},
  {&__pyx_n_s_ByteCountingOutputStream, __pyx_k_ByteCountingOutputStream, sizeof(__pyx_k_ByteCountingOutputStream), 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_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_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_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_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_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_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_DeterministicFastPrimitivesCoder, __pyx_k_DeterministicFastPrimitivesCoder, sizeof(__pyx_k_DeterministicFastPrimitivesCoder), 0, 0, 1, 1},
  {&__pyx_n_s_DeterministicFastPrimitivesCoder_2, __pyx_k_DeterministicFastPrimitivesCoder_2, sizeof(__pyx_k_DeterministicFastPrimitivesCoder_2), 0, 0, 1, 1},
  {&__pyx_n_s_DeterministicFastPrimitivesCoder_3, __pyx_k_DeterministicFastPrimitivesCoder_3, sizeof(__pyx_k_DeterministicFastPrimitivesCoder_3), 0, 0, 1, 1},
  {&__pyx_n_s_DeterministicFastPrimitivesCoder_4, __pyx_k_DeterministicFastPrimitivesCoder_4, sizeof(__pyx_k_DeterministicFastPrimitivesCoder_4), 0, 0, 1, 1},
  {&__pyx_n_s_DeterministicFastPrimitivesCoder_5, __pyx_k_DeterministicFastPrimitivesCoder_5, sizeof(__pyx_k_DeterministicFastPrimitivesCoder_5), 0, 0, 1, 1},
  {&__pyx_n_s_DeterministicFastPrimitivesCoder_6, __pyx_k_DeterministicFastPrimitivesCoder_6, sizeof(__pyx_k_DeterministicFastPrimitivesCoder_6), 0, 0, 1, 1},
  {&__pyx_n_s_DeterministicFastPrimitivesCoder_7, __pyx_k_DeterministicFastPrimitivesCoder_7, sizeof(__pyx_k_DeterministicFastPrimitivesCoder_7), 0, 0, 1, 1},
  {&__pyx_n_s_DeterministicFastPrimitivesCoder_8, __pyx_k_DeterministicFastPrimitivesCoder_8, sizeof(__pyx_k_DeterministicFastPrimitivesCoder_8), 0, 0, 1, 1},
  {&__pyx_n_s_EARLY, __pyx_k_EARLY, sizeof(__pyx_k_EARLY), 0, 0, 1, 1},
  {&__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___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_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_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_n_s_INT_TYPE, __pyx_k_INT_TYPE, sizeof(__pyx_k_INT_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x0f, __pyx_k_Incompatible_checksums_s_vs_0x0f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x0f), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x11, __pyx_k_Incompatible_checksums_s_vs_0x11, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x11), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_k_Incompatible_checksums_s_vs_0x56, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x56), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x6f, __pyx_k_Incompatible_checksums_s_vs_0x6f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x6f), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x77, __pyx_k_Incompatible_checksums_s_vs_0x77, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x77), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x7f, __pyx_k_Incompatible_checksums_s_vs_0x7f, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x7f), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd7, __pyx_k_Incompatible_checksums_s_vs_0xd7, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd7), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xe1, __pyx_k_Incompatible_checksums_s_vs_0xe1, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xe1), 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__from_no, __pyx_k_IntervalWindowCoderImpl__from_no, sizeof(__pyx_k_IntervalWindowCoderImpl__from_no), 0, 0, 1, 1},
  {&__pyx_n_s_IntervalWindowCoderImpl__to_norm, __pyx_k_IntervalWindowCoderImpl__to_norm, sizeof(__pyx_k_IntervalWindowCoderImpl__to_norm), 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_s_Invalid_PaneInfoEncoding_s, __pyx_k_Invalid_PaneInfoEncoding_s, sizeof(__pyx_k_Invalid_PaneInfoEncoding_s), 0, 0, 1, 0},
  {&__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_LIST_TYPE, __pyx_k_LIST_TYPE, sizeof(__pyx_k_LIST_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_LengthPrefixCoderImpl, __pyx_k_LengthPrefixCoderImpl, sizeof(__pyx_k_LengthPrefixCoderImpl), 0, 0, 1, 1},
  {&__pyx_n_s_LengthPrefixCoderImpl___init, __pyx_k_LengthPrefixCoderImpl___init, sizeof(__pyx_k_LengthPrefixCoderImpl___init), 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_MAX_TIMESTAMP, __pyx_k_MAX_TIMESTAMP, sizeof(__pyx_k_MAX_TIMESTAMP), 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_NONE_TYPE, __pyx_k_NONE_TYPE, sizeof(__pyx_k_NONE_TYPE), 0, 0, 1, 1},
  {&__pyx_n_s_NameError, __pyx_k_NameError, sizeof(__pyx_k_NameError), 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_kp_s_Number_of_components_does_not_ma, __pyx_k_Number_of_components_does_not_ma, sizeof(__pyx_k_Number_of_components_does_not_ma), 0, 0, 1, 0},
  {&__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_OutputStream, __pyx_k_OutputStream, sizeof(__pyx_k_OutputStream), 0, 0, 1, 1},
  {&__pyx_n_s_PaneInfo, __pyx_k_PaneInfo, sizeof(__pyx_k_PaneInfo), 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_PaneInfoTiming, __pyx_k_PaneInfoTiming, sizeof(__pyx_k_PaneInfoTiming), 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_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_SET_TYPE, __pyx_k_SET_TYPE, sizeof(__pyx_k_SET_TYPE), 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_SerializeToString, __pyx_k_SerializeToString, sizeof(__pyx_k_SerializeToString), 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_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_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_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_Timestamp, __pyx_k_Timestamp, sizeof(__pyx_k_Timestamp), 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_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___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_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_deterministically_code, __pyx_k_Unable_to_deterministically_code, sizeof(__pyx_k_Unable_to_deterministically_code), 0, 0, 1, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 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_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__from_nor, __pyx_k_WindowedValueCoderImpl__from_nor, sizeof(__pyx_k_WindowedValueCoderImpl__from_nor), 0, 0, 1, 1},
  {&__pyx_n_s_WindowedValueCoderImpl__to_norma, __pyx_k_WindowedValueCoderImpl__to_norma, sizeof(__pyx_k_WindowedValueCoderImpl__to_norma), 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_n_s__137, __pyx_k__137, sizeof(__pyx_k__137), 0, 0, 1, 1},
  {&__pyx_kp_b__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 0, 0},
  {&__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_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_transforms_window, __pyx_k_apache_beam_transforms_window, sizeof(__pyx_k_apache_beam_transforms_window), 0, 0, 1, 1},
  {&__pyx_n_s_apache_beam_utils, __pyx_k_apache_beam_utils, sizeof(__pyx_k_apache_beam_utils), 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_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1},
  {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 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_coder, __pyx_k_coder, sizeof(__pyx_k_coder), 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_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_create_InputStream, __pyx_k_create_InputStream, sizeof(__pyx_k_create_InputStream), 0, 0, 1, 1},
  {&__pyx_n_s_create_OutputStream, __pyx_k_create_OutputStream, sizeof(__pyx_k_create_OutputStream), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 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_n_s_default_size_estimator, __pyx_k_default_size_estimator, sizeof(__pyx_k_default_size_estimator), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_dumps, __pyx_k_dumps, sizeof(__pyx_k_dumps), 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_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_encoded_byte, __pyx_k_encoded_byte, sizeof(__pyx_k_encoded_byte), 0, 0, 1, 1},
  {&__pyx_n_s_encoded_value, __pyx_k_encoded_value, sizeof(__pyx_k_encoded_value), 0, 0, 1, 1},
  {&__pyx_n_s_encoder, __pyx_k_encoder, sizeof(__pyx_k_encoder), 0, 0, 1, 1},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_s_end_millis, __pyx_k_end_millis, sizeof(__pyx_k_end_millis), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 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_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_from_normal_time, __pyx_k_from_normal_time, sizeof(__pyx_k_from_normal_time), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 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_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_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_inner_size, __pyx_k_inner_size, sizeof(__pyx_k_inner_size), 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_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
  {&__pyx_kp_s_latin_1, __pyx_k_latin_1, sizeof(__pyx_k_latin_1), 0, 0, 1, 0},
  {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1},
  {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1},
  {&__pyx_n_s_long, __pyx_k_long, sizeof(__pyx_k_long), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 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_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_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_n_s_nonspeculative_index, __pyx_k_nonspeculative_index, sizeof(__pyx_k_nonspeculative_index), 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_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 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_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 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_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_capi, __pyx_k_pyx_capi, sizeof(__pyx_k_pyx_capi), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_AbstractComponent, __pyx_k_pyx_unpickle_AbstractComponent, sizeof(__pyx_k_pyx_unpickle_AbstractComponent), 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_DeterministicFast, __pyx_k_pyx_unpickle_DeterministicFast, sizeof(__pyx_k_pyx_unpickle_DeterministicFast), 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_IterableCoderImpl, __pyx_k_pyx_unpickle_IterableCoderImpl, sizeof(__pyx_k_pyx_unpickle_IterableCoderImpl), 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_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_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_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, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_read_bigendian_uint64, __pyx_k_read_bigendian_uint64, sizeof(__pyx_k_read_bigendian_uint64), 0, 0, 1, 1},
  {&__pyx_n_s_read_var_int64, __pyx_k_read_var_int64, sizeof(__pyx_k_read_var_int64), 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_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_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_span, __pyx_k_span, sizeof(__pyx_k_span), 0, 0, 1, 1},
  {&__pyx_n_s_span_micros, __pyx_k_span_micros, sizeof(__pyx_k_span_micros), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_start_millis, __pyx_k_start_millis, sizeof(__pyx_k_start_millis), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_step_label, __pyx_k_step_label, sizeof(__pyx_k_step_label), 0, 0, 1, 1},
  {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 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_timing, __pyx_k_timing, sizeof(__pyx_k_timing), 0, 0, 1, 1},
  {&__pyx_n_s_to_normal_time, __pyx_k_to_normal_time, sizeof(__pyx_k_to_normal_time), 0, 0, 1, 1},
  {&__pyx_n_s_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 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_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__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_value_length, __pyx_k_value_length, sizeof(__pyx_k_value_length), 0, 0, 1, 1},
  {&__pyx_n_s_value_size, __pyx_k_value_size, sizeof(__pyx_k_value_size), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 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_windowed_value, __pyx_k_windowed_value, sizeof(__pyx_k_windowed_value), 0, 0, 1, 1},
  {&__pyx_n_s_windows, __pyx_k_windows, sizeof(__pyx_k_windows), 0, 0, 1, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_n_s_write_bigendian_uint64, __pyx_k_write_bigendian_uint64, sizeof(__pyx_k_write_bigendian_uint64), 0, 0, 1, 1},
  {&__pyx_n_s_write_var_int64, __pyx_k_write_var_int64, sizeof(__pyx_k_write_var_int64), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 54, __pyx_L1_error)
  __pyx_builtin_NameError = __Pyx_GetBuiltinName(__pyx_n_s_NameError); if (!__pyx_builtin_NameError) __PYX_ERR(0, 64, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 443, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 74, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 216, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 519, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 530, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

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

  /* "apache_beam/coders/coder_impl.py":302
 *       text_value = value  # for typing
 *       stream.write_byte(UNICODE_TYPE)
 *       stream.write(text_value.encode('utf-8'), nested)             # <<<<<<<<<<<<<<
 *     elif t is list or t is tuple or t is set:
 *       stream.write_byte(
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "apache_beam/coders/coder_impl.py":519
 *     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_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Number_of_components_does_not_ma); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "apache_beam/coders/coder_impl.py":72
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     raise NotImplementedError
 */
  __pyx_tuple__4 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 72, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":76
 *     raise NotImplementedError
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     raise NotImplementedError
 */
  __pyx_tuple__6 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 76, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 76, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":80
 *     raise NotImplementedError
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     """Encodes an object to an unnested string."""
 *     raise NotImplementedError
 */
  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);
  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 80, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 80, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":84
 *     raise NotImplementedError
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     """Decodes an object to an unnested string."""
 *     raise NotImplementedError
 */
  __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);
  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 84, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 84, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":88
 *     raise NotImplementedError
 * 
 *   def encode_nested(self, value):             # <<<<<<<<<<<<<<
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, True)
 */
  __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);
  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_nested, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 88, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":93
 *     return out.get()
 * 
 *   def decode_nested(self, encoded):             # <<<<<<<<<<<<<<
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 */
  __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_nested, 93, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 93, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":96
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     return self._get_nested_size(len(self.encode(value)), nested)
 */
  __pyx_tuple__16 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);
  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 96, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 96, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":100
 *     return self._get_nested_size(len(self.encode(value)), nested)
 * 
 *   def _get_nested_size(self, inner_size, nested):             # <<<<<<<<<<<<<<
 *     if not nested:
 *       return inner_size
 */
  __pyx_tuple__18 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_inner_size, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_nested_size, 100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 100, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":106
 *     return varint_size + inner_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables.
 * 
 */
  __pyx_tuple__20 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 106, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__24 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":130
 *   Subclass of CoderImpl implementing stream methods using encode/decode."""
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     stream.write(self.encode(value), nested)
 */
  __pyx_tuple__26 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);
  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __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__27)) __PYX_ERR(0, 130, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":134
 *     stream.write(self.encode(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     return self.decode(stream.read_all(nested))
 */
  __pyx_tuple__28 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 134, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 134, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__32 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":144
 *   Subclass of CoderImpl implementing encode/decode using stream methods."""
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, False)
 */
  __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 144, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":149
 *     return out.get()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 */
  __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 149, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":152
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     out = ByteCountingOutputStream()
 */
  __pyx_tuple__38 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 152, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__42 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":173
 *     self._size_estimator = size_estimator or self._default_size_estimator
 * 
 *   def _default_size_estimator(self, value):             # <<<<<<<<<<<<<<
 *     return len(self.encode(value))
 * 
 */
  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);
  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_default_size_estimator, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 173, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":176
 *     return len(self.encode(value))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     return stream.write(self._encoder(value), nested)
 * 
 */
  __pyx_tuple__46 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 176, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 176, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":179
 *     return stream.write(self._encoder(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     return self._decoder(stream.read_all(nested))
 * 
 */
  __pyx_tuple__48 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 179, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 179, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":182
 *     return self._decoder(stream.read_all(nested))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return self._encoder(value)
 * 
 */
  __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 182, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 182, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":185
 *     return self._encoder(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._decoder(encoded)
 * 
 */
  __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 185, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":188
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 */
  __pyx_tuple__54 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 188, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":191
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # TODO(robertwb): Remove this once all coders are correct.
 *     if isinstance(value, observable.ObservableMixin):
 */
  __pyx_tuple__56 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 191, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._decoder, self._encoder, self._size_estimator)
 */
  __pyx_tuple__58 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     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__60 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(1, 14, __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_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":221
 *               value, type(value), self._step_label))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     self._check_safe(value)
 *     return self._underlying_coder.encode_to_stream(value, stream, nested)
 */
  __pyx_tuple__62 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 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_encode_to_stream, 221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 221, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":225
 *     return self._underlying_coder.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.decode_from_stream(stream, nested)
 * 
 */
  __pyx_tuple__64 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 225, __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_decode_from_stream, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 225, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":228
 *     return self._underlying_coder.decode_from_stream(stream, nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     self._check_safe(value)
 *     return self._underlying_coder.encode(value)
 */
  __pyx_tuple__66 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_encode, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 228, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":232
 *     return self._underlying_coder.encode(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.decode(encoded)
 * 
 */
  __pyx_tuple__68 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_decode, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 232, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":235
 *     return self._underlying_coder.decode(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.estimate_size(value, nested)
 * 
 */
  __pyx_tuple__70 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 235, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":238
 *     return self._underlying_coder.estimate_size(value, nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.get_estimated_size_and_observables(
 *         value, nested)
 */
  __pyx_tuple__72 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 238, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._step_label, self._underlying_coder)
 */
  __pyx_tuple__74 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__76 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":246
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def __init__(self, proto_message_type):             # <<<<<<<<<<<<<<
 *     self.proto_message_type = proto_message_type
 * 
 */
  __pyx_tuple__78 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_proto_message_type); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_init, 246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 246, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":249
 *     self.proto_message_type = proto_message_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializeToString()
 * 
 */
  __pyx_tuple__80 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 249, __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_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 249, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 249, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":252
 *     return value.SerializeToString()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)
 */
  __pyx_tuple__82 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_encoded, __pyx_n_s_proto_message); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 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_decode, 252, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 252, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":277
 *     self.fallback_coder_impl = fallback_coder_impl
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     if isinstance(value, observable.ObservableMixin):
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 */
  __pyx_tuple__84 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_get_estimated_size_and_observabl, 277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 277, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":286
 *     return out.get_count(), []
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     t = type(value)
 *     if value is None:
 */
  __pyx_tuple__86 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 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_encode_to_stream, 286, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 286, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":329
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     t = stream.read_byte()
 *     if t == NONE_TYPE:
 */
  __pyx_tuple__88 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 329, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.fallback_coder_impl,)
 */
  __pyx_tuple__90 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__92 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(1, 14, __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_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":367
 *   A coder for bytes/str objects."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write(value, nested)
 * 
 */
  __pyx_tuple__94 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 367, __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, 367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 367, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":370
 *     out.write(value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return in_stream.read_all(nested)
 * 
 */
  __pyx_tuple__96 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 370, __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, 370, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 370, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":373
 *     return in_stream.read_all(nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert isinstance(value, bytes), (value, type(value))
 *     return value
 */
  __pyx_tuple__98 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 373, __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, 373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 373, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":377
 *     return value
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return encoded
 * 
 */
  __pyx_tuple__100 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 377, __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, 377, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 377, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__104 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":384
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_bigendian_double(value)
 * 
 */
  __pyx_tuple__106 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(4, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 384, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":387
 *     out.write_bigendian_double(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return in_stream.read_bigendian_double()
 * 
 */
  __pyx_tuple__108 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 387, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 387, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":390
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A double is encoded as 8 bytes, regardless of nesting.
 *     return 8
 */
  __pyx_tuple__110 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unused_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_estimate_size, 390, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 390, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__114 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":399
 * 
 *   # 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 - (1 << 63)
 */
  __pyx_tuple__116 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 399, __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_to_normal_time, 399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 399, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":403
 *     return value - (1 << 63)
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)
 */
  __pyx_tuple__118 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 403, __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_from_normal_time, 403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 403, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":407
 *     return value + (1 << 63)
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     span_micros = value.end.micros - value.start.micros
 *     out.write_bigendian_uint64(
 */
  __pyx_tuple__120 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested, __pyx_n_s_span_micros); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 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_to_stream, 407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 407, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":413
 *     out.write_var_int64(span_micros // 1000)
 * 
 *   def decode_from_stream(self, in_, nested):             # <<<<<<<<<<<<<<
 *     end_millis = self._to_normal_time(in_.read_bigendian_uint64())
 *     start_millis = end_millis - in_.read_var_int64()
 */
  __pyx_tuple__122 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_in, __pyx_n_s_nested, __pyx_n_s_end_millis, __pyx_n_s_start_millis, __pyx_n_s_IntervalWindow, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 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_from_stream, 413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 413, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":421
 *     return ret
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 *     # and a varint timespam.
 */
  __pyx_tuple__124 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested, __pyx_n_s_span); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 421, __pyx_L1_error)
  __pyx_tuple__126 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "apache_beam/coders/coder_impl.py":431
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_bigendian_int64(value.micros)
 * 
 */
  __pyx_tuple__127 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 431, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":434
 *     out.write_bigendian_int64(value.micros)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return Timestamp(micros=in_stream.read_bigendian_int64())
 * 
 */
  __pyx_tuple__129 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);
  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 434, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":437
 *     return Timestamp(micros=in_stream.read_bigendian_int64())
 * 
 *   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__131 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unused_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 437, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__135 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":443
 * 
 * 
 * small_ints = [chr(_).encode('latin-1') for _ in range(128)]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_s_latin_1); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "apache_beam/coders/coder_impl.py":451
 *   A coder for long/int objects."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_var_int64(value)
 * 
 */
  __pyx_tuple__139 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 451, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 451, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":454
 *     out.write_var_int64(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return in_stream.read_var_int64()
 * 
 */
  __pyx_tuple__141 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 454, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 454, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":457
 *     return in_stream.read_var_int64()
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):
 */
  __pyx_tuple__143 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 457, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":463
 *     return StreamCoderImpl.encode(self, value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 */
  __pyx_tuple__145 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 463, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":470
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that VarInts are encoded the same way regardless of nesting.
 *     return get_varint_size(value)
 */
  __pyx_tuple__147 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 470, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 470, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__151 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":483
 *     self._value = value
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_tuple__153 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 483, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":486
 *     pass
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     return self._value
 * 
 */
  __pyx_tuple__155 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 486, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 486, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":489
 *     return self._value
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     b = b''  # avoid byte vs str vs unicode error
 *     return b
 */
  __pyx_tuple__157 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode, 489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 489, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":493
 *     return b
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._value
 * 
 */
  __pyx_tuple__159 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_encoded); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode, 493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 493, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":496
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  __pyx_tuple__161 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 496, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 496, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":510
 *     self._coder_impls = tuple(coder_impls)
 * 
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_tuple__167 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_extract_components, 510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 510, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":513
 *     raise NotImplementedError
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_tuple__169 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_components); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_components, 513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 513, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":516
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     values = self._extract_components(value)
 *     if len(self._coder_impls) != len(values):
 */
  __pyx_tuple__171 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 516, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":526
 *                          nested or i + 1 < len(self._coder_impls))
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return self._construct_from_components(
 *         [c.decode_from_stream(in_stream,
 */
  __pyx_tuple__173 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 526, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":532
 *          for i, c in enumerate(self._coder_impls)])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores sizes of observable components.
 */
  __pyx_tuple__175 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_estimate_size, 532, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 532, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":539
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     values = self._extract_components(value)
 */
  __pyx_tuple__177 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 539, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__181 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":557
 *   """A coder for tuple objects."""
 * 
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
  __pyx_tuple__183 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_extract_components, 557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 557, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":560
 *     return value
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */
  __pyx_tuple__185 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_components); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_components, 560, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 560, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     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__189 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":594
 *     self._elem_coder = elem_coder
 * 
 *   def _construct_from_sequence(self, values):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_tuple__191 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_values); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_construct_from_sequence, 594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 594, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":597
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__'):
 */
  __pyx_tuple__193 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(4, 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_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 597, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":624
 *       out.write_var_int64(0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     size = in_stream.read_bigendian_int32()
 * 
 */
  __pyx_tuple__195 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 624, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":640
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores element sizes.
 */
  __pyx_tuple__197 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 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_estimate_size, 640, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 640, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":647
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     estimated_size = 0
 */
  __pyx_tuple__199 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 647, __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_get_estimated_size_and_observabl, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 647, __pyx_L1_error)

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

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__203 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":675
 *   A coder for homogeneous tuple objects."""
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */
  __pyx_tuple__205 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_components); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 675, __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_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_sequence, 675, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 675, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._elem_coder,)
 */
  __pyx_tuple__207 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(1, 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_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_tuple__209 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":684
 *   A coder for homogeneous iterable objects."""
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return components
 * 
 */
  __pyx_tuple__211 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_components); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_construct_from_sequence, 684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 684, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._elem_coder,)
 */
  __pyx_tuple__213 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__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)":14
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IterableCoderImpl__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, 14, __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, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":718
 *       return PaneInfoEncoding.TWO_INDICES
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     encoding_type = self._choose_encoding(value)
 *     out.write_byte(value.encoded_byte | (encoding_type << 4))
 */
  __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, 718, __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, 718, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 718, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":731
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     encoded_first_byte = in_stream.read_byte()
 *     base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF]
 */
  __pyx_tuple__219 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 731, __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, 731, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 731, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":752
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     size = 1
 */
  __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, 752, __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, 752, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 752, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = ()
 */
  __pyx_tuple__223 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__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)":14
 *     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__225 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(1, 14, __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, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":773
 *   # TODO(BEAM-1524): 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 - (1 << 63)
 */
  __pyx_tuple__227 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_to_normal_time, 773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 773, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":777
 *     return value - (1 << 63)
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)
 */
  __pyx_tuple__229 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_from_normal_time, 777, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 777, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":788
 *     self._pane_info_coder = PaneInfoCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     wv = value  # type cast
 *     # Avoid creation of Timestamp object.
 */
  __pyx_tuple__231 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 788, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 788, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":805
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     timestamp = self._to_normal_time(in_stream.read_bigendian_uint64())
 *     # Restore MIN/MAX timestamps to their actual values as encoding incurs loss
 */
  __pyx_tuple__233 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_decode_from_stream, 805, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 805, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":835
 *         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__235 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_get_estimated_size_and_observabl, 835, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 835, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder)
 */
  __pyx_tuple__237 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_use_setstate, __pyx_n_s_state, __pyx_n_s_dict_2); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(1, 1, __pyx_L1_error)

  /* "(tree fragment)":14
 *     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__239 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 14, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(1, 14, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":862
 *   Coder which prefixes the length of the encoded object in the stream."""
 * 
 *   def __init__(self, value_coder):             # <<<<<<<<<<<<<<
 *     self._value_coder = value_coder
 * 
 */
  __pyx_tuple__241 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value_coder); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 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_init, 862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 862, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":865
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     encoded_value = self._value_coder.encode(value)
 *     out.write_var_int64(len(encoded_value))
 */
  __pyx_tuple__243 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_out, __pyx_n_s_nested, __pyx_n_s_encoded_value); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_apache_beam_coders_coder_impl_py, __pyx_n_s_encode_to_stream, 865, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 865, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":870
 *     out.write(encoded_value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value_length = in_stream.read_var_int64()
 *     return self._value_coder.decode(in_stream.read(value_length))
 */
  __pyx_tuple__245 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_in_stream, __pyx_n_s_nested, __pyx_n_s_value_length); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 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, 870, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 870, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":874
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     value_size = self._value_coder.estimate_size(value)
 *     return get_varint_size(value_size) + value_size
 */
  __pyx_tuple__247 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_nested, __pyx_n_s_value_size); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 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_estimate_size, 874, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(0, 874, __pyx_L1_error)
  __pyx_tuple__249 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);

  /* "(tree fragment)":1
 * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_tuple__250 = 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__250)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);
  __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__252 = 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__252)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);
  __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SimpleCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__254 = 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__254)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);
  __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_StreamCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__256 = 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__256)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);
  __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CallbackCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__258 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);
  __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_DeterministicFast, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__260 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);
  __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FastPrimitivesCod, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__262 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);
  __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BytesCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__264 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);
  __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FloatCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__266 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);
  __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TimestampCoderImp, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__268 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);
  __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VarIntCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__270 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);
  __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SingletonCoderImp, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__272 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);
  __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AbstractComponent, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__274 = 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__274)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__274);
  __Pyx_GIVEREF(__pyx_tuple__274);
  __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TupleCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__276 = 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__276)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__276);
  __Pyx_GIVEREF(__pyx_tuple__276);
  __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SequenceCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__278 = 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__278)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);
  __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_TupleSequenceCode, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__280 = 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__280)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);
  __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_IterableCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__282 = 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__282)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);
  __pyx_codeobj__283 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PaneInfoCoderImpl, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__284 = 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__284)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);
  __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_WindowedValueCode, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_iteritems.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_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __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_65536 = PyInt_FromLong(65536L); if (unlikely(!__pyx_int_65536)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_15996217 = PyInt_FromLong(15996217L); if (unlikely(!__pyx_int_15996217)) __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_90923958 = PyInt_FromLong(90923958L); if (unlikely(!__pyx_int_90923958)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_116739418 = PyInt_FromLong(116739418L); if (unlikely(!__pyx_int_116739418)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_125287163 = PyInt_FromLong(125287163L); if (unlikely(!__pyx_int_125287163)) __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_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_235957399 = PyInt_FromLong(235957399L); if (unlikely(!__pyx_int_235957399)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_9223372036854775808 = PyInt_FromString((char *)"9223372036854775808", 0, 0); if (unlikely(!__pyx_int_9223372036854775808)) __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)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_modinit_global_init_code(void); /*proto*/
static int __Pyx_modinit_variable_export_code(void); /*proto*/
static int __Pyx_modinit_function_export_code(void); /*proto*/
static int __Pyx_modinit_type_init_code(void); /*proto*/
static int __Pyx_modinit_type_import_code(void); /*proto*/
static int __Pyx_modinit_variable_import_code(void); /*proto*/
static int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_11apache_beam_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_NoneType = Py_None; Py_INCREF(Py_None);
  __pyx_v_11apache_beam_6coders_10coder_impl_small_ints = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  if (__Pyx_ExportVoidPtr(__pyx_n_s_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_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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "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, "char") < 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)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

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

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_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, 69, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl.tp_print = 0;
  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, 69, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "CoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_CoderImpl) < 0) __PYX_ERR(0, 69, __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, 125, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl.tp_print = 0;
  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, 125, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "SimpleCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_SimpleCoderImpl) < 0) __PYX_ERR(0, 125, __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, 139, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl.tp_print = 0;
  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, 139, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "StreamCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_StreamCoderImpl) < 0) __PYX_ERR(0, 139, __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, 159, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl.tp_print = 0;
  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, 159, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "CallbackCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_CallbackCoderImpl) < 0) __PYX_ERR(0, 159, __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_DeterministicFastPrimitivesCoderImpl = &__pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.__pyx_base = *__pyx_vtabptr_11apache_beam_6coders_10coder_impl_CoderImpl;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.__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_36DeterministicFastPrimitivesCoderImpl_encode_to_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.__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_36DeterministicFastPrimitivesCoderImpl_decode_from_stream;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.__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_36DeterministicFastPrimitivesCoderImpl_encode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.__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_36DeterministicFastPrimitivesCoderImpl_decode;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.__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_36DeterministicFastPrimitivesCoderImpl_estimate_size;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.__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_36DeterministicFastPrimitivesCoderImpl_get_estimated_size_and_observables;
  __pyx_vtable_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl._check_safe = (int (*)(struct __pyx_obj_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl *, PyObject *))__pyx_f_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl__check_safe;
  __pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.tp_base = __pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl;
  if (PyType_Ready(&__pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.tp_print = 0;
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.tp_dictoffset && __pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl.tp_dict, __pyx_vtabptr_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "DeterministicFastPrimitivesCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 200, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl;
  __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_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, 271, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl.tp_print = 0;
  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, 271, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "FastPrimitivesCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 271, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl) < 0) __PYX_ERR(0, 271, __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_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, 362, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl.tp_print = 0;
  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, 362, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "BytesCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < 0) __PYX_ERR(0, 362, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_BytesCoderImpl) < 0) __PYX_ERR(0, 362, __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_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, 381, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl.tp_print = 0;
  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, 381, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "FloatCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < 0) __PYX_ERR(0, 381, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_FloatCoderImpl) < 0) __PYX_ERR(0, 381, __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, 428, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl.tp_print = 0;
  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, 428, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "TimestampCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < 0) __PYX_ERR(0, 428, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_TimestampCoderImpl) < 0) __PYX_ERR(0, 428, __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, 446, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl.tp_print = 0;
  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, 446, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "VarIntCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < 0) __PYX_ERR(0, 446, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_VarIntCoderImpl) < 0) __PYX_ERR(0, 446, __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, 475, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl.tp_print = 0;
  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, 475, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "SingletonCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < 0) __PYX_ERR(0, 475, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_SingletonCoderImpl) < 0) __PYX_ERR(0, 475, __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, 500, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl.tp_print = 0;
  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, 500, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "AbstractComponentCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl) < 0) __PYX_ERR(0, 500, __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, 554, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl.tp_print = 0;
  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, 554, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "TupleCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_TupleCoderImpl) < 0) __PYX_ERR(0, 554, __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, 564, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl.tp_print = 0;
  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, 564, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "SequenceCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < 0) __PYX_ERR(0, 564, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_SequenceCoderImpl) < 0) __PYX_ERR(0, 564, __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, 670, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl.tp_print = 0;
  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, 670, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "TupleSequenceCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < 0) __PYX_ERR(0, 670, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl) < 0) __PYX_ERR(0, 670, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl;
  __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, 679, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl.tp_print = 0;
  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, 679, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "IterableCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < 0) __PYX_ERR(0, 679, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_IterableCoderImpl) < 0) __PYX_ERR(0, 679, __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_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 *, PyObject *))__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, 703, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl.tp_print = 0;
  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, 703, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "PaneInfoCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < 0) __PYX_ERR(0, 703, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl) < 0) __PYX_ERR(0, 703, __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_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, 764, __pyx_L1_error)
  __pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl.tp_print = 0;
  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, 764, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "WindowedValueCoderImpl", (PyObject *)&__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < 0) __PYX_ERR(0, 764, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl) < 0) __PYX_ERR(0, 764, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl = &__pyx_type_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(2, 9, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_6stream_OutputStream = __Pyx_ImportType("apache_beam.coders.stream", "OutputStream", sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_OutputStream), 1); if (unlikely(!__pyx_ptype_11apache_beam_6coders_6stream_OutputStream)) __PYX_ERR(3, 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(3, 21, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream = __Pyx_ImportType("apache_beam.coders.stream", "ByteCountingOutputStream", sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_ByteCountingOutputStream), 1); if (unlikely(!__pyx_ptype_11apache_beam_6coders_6stream_ByteCountingOutputStream)) __PYX_ERR(3, 39, __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(3, 39, __pyx_L1_error)
  __pyx_ptype_11apache_beam_6coders_6stream_InputStream = __Pyx_ImportType("apache_beam.coders.stream", "InputStream", sizeof(struct __pyx_obj_11apache_beam_6coders_6stream_InputStream), 1); if (unlikely(!__pyx_ptype_11apache_beam_6coders_6stream_InputStream)) __PYX_ERR(3, 51, __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(3, 51, __pyx_L1_error)
  __pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue = __Pyx_ImportType("apache_beam.utils.windowed_value", "WindowedValue", sizeof(struct __pyx_obj_11apache_beam_5utils_14windowed_value_WindowedValue), 1); if (unlikely(!__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(4, 25, __pyx_L1_error)
  __pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue = (struct __pyx_vtabstruct_11apache_beam_5utils_14windowed_value_WindowedValue*)__Pyx_GetVtable(__pyx_ptype_11apache_beam_5utils_14windowed_value_WindowedValue->tp_dict); if (unlikely(!__pyx_vtabptr_11apache_beam_5utils_14windowed_value_WindowedValue)) __PYX_ERR(4, 25, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __pyx_t_1 = __Pyx_ImportModule("apache_beam.utils.windowed_value"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "Timestamp", (void **)&__pyx_vp_11apache_beam_5utils_14windowed_value_Timestamp, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_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;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = __Pyx_ImportModule("apache_beam.utils.windowed_value"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__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)
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}


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


static int __pyx_pymod_exec_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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  long __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_coder_impl(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("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)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_apache_beam__coders__coder_impl) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "apache_beam.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)) goto __pyx_L1_error;
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
  if (unlikely(__Pyx_modinit_variable_import_code() != 0)) goto __pyx_L1_error;
  if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __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
 * from __future__ import division
 * 
 * import sys             # <<<<<<<<<<<<<<
 * from builtins import chr
 * from builtins import object
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 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_sys, __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 sys
 * from builtins import chr             # <<<<<<<<<<<<<<
 * from builtins import object
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_chr);
  __Pyx_GIVEREF(__pyx_n_s_chr);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_chr);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_builtins, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_chr); 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_chr, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":37
 * import sys
 * from builtins import chr
 * from builtins import object             # <<<<<<<<<<<<<<
 * 
 * from apache_beam.coders import observable
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_object);
  __Pyx_GIVEREF(__pyx_n_s_object);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_object);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_builtins, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_object, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":39
 * from builtins import object
 * 
 * from apache_beam.coders import observable             # <<<<<<<<<<<<<<
 * from apache_beam.utils import windowed_value
 * from apache_beam.utils.timestamp import MAX_TIMESTAMP
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_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, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_observable); 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_observable, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":40
 * 
 * from apache_beam.coders import observable
 * from apache_beam.utils import windowed_value             # <<<<<<<<<<<<<<
 * 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, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_windowed_value);
  __Pyx_GIVEREF(__pyx_n_s_windowed_value);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_windowed_value);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_apache_beam_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __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_windowed_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_windowed_value, __pyx_t_2) < 0) __PYX_ERR(0, 40, __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":41
 * from apache_beam.coders import observable
 * from apache_beam.utils import windowed_value
 * 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, 41, __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, 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_MAX_TIMESTAMP); 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_MAX_TIMESTAMP, __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
 * from apache_beam.utils import windowed_value
 * 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, 42, __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, 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_MIN_TIMESTAMP); 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_MIN_TIMESTAMP, __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 apache_beam.utils.timestamp import MAX_TIMESTAMP
 * from apache_beam.utils.timestamp import MIN_TIMESTAMP
 * from apache_beam.utils.timestamp import Timestamp             # <<<<<<<<<<<<<<
 * 
 * # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
 */
  __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_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, 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_Timestamp); 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_Timestamp, __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":46
 * 
 * # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
 * try:             # <<<<<<<<<<<<<<
 *   from .stream import InputStream as create_InputStream
 *   from .stream import OutputStream as create_OutputStream
 */
  {
    __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":47
 * # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
 * try:
 *   from .stream import InputStream as create_InputStream             # <<<<<<<<<<<<<<
 *   from .stream import OutputStream as create_OutputStream
 *   from .stream import ByteCountingOutputStream
 */
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L2_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_1 = __Pyx_Import(__pyx_n_s_stream, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L2_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_InputStream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L2_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_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":48
 * try:
 *   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_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_n_s_OutputStream);
      __Pyx_GIVEREF(__pyx_n_s_OutputStream);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OutputStream);
      __pyx_t_2 = __Pyx_Import(__pyx_n_s_stream, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L2_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_OutputStream); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __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_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":49
 *   from .stream import InputStream as create_InputStream
 *   from .stream import OutputStream as create_OutputStream
 *   from .stream import ByteCountingOutputStream             # <<<<<<<<<<<<<<
 *   from .stream import get_varint_size
 *   globals()['create_InputStream'] = create_InputStream
 */
      __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L2_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_1 = __Pyx_Import(__pyx_n_s_stream, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L2_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_ByteCountingOutputStream); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L2_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_1); __pyx_t_1 = 0;

      /* "apache_beam/coders/coder_impl.py":50
 *   from .stream import OutputStream as create_OutputStream
 *   from .stream import ByteCountingOutputStream
 *   from .stream import get_varint_size             # <<<<<<<<<<<<<<
 *   globals()['create_InputStream'] = create_InputStream
 *   globals()['create_OutputStream'] = create_OutputStream
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_n_s_get_varint_size);
      __Pyx_GIVEREF(__pyx_n_s_get_varint_size);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_get_varint_size);
      __pyx_t_2 = __Pyx_Import(__pyx_n_s_stream, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L2_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_get_varint_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_1);
      __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_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":51
 *   from .stream import ByteCountingOutputStream
 *   from .stream import get_varint_size
 *   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, 51, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_s_create_InputStream, __pyx_v_11apache_beam_6coders_10coder_impl_create_InputStream) < 0)) __PYX_ERR(0, 51, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":52
 *   from .stream import get_varint_size
 *   globals()['create_InputStream'] = create_InputStream
 *   globals()['create_OutputStream'] = create_OutputStream             # <<<<<<<<<<<<<<
 *   globals()['ByteCountingOutputStream'] = ByteCountingOutputStream
 * except ImportError:
 */
      __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_s_create_OutputStream, __pyx_v_11apache_beam_6coders_10coder_impl_create_OutputStream) < 0)) __PYX_ERR(0, 52, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":53
 *   globals()['create_InputStream'] = create_InputStream
 *   globals()['create_OutputStream'] = create_OutputStream
 *   globals()['ByteCountingOutputStream'] = ByteCountingOutputStream             # <<<<<<<<<<<<<<
 * except ImportError:
 *   from .slow_stream import InputStream as create_InputStream
 */
      __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_s_ByteCountingOutputStream, __pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream) < 0)) __PYX_ERR(0, 53, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "apache_beam/coders/coder_impl.py":46
 * 
 * # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
 * try:             # <<<<<<<<<<<<<<
 *   from .stream import InputStream as create_InputStream
 *   from .stream import OutputStream as create_OutputStream
 */
    }
    __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":54
 *   globals()['create_OutputStream'] = create_OutputStream
 *   globals()['ByteCountingOutputStream'] = ByteCountingOutputStream
 * except ImportError:             # <<<<<<<<<<<<<<
 *   from .slow_stream import InputStream as create_InputStream
 *   from .slow_stream import OutputStream as create_OutputStream
 */
    __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, 54, __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":55
 *   globals()['ByteCountingOutputStream'] = ByteCountingOutputStream
 * except ImportError:
 *   from .slow_stream import InputStream as create_InputStream             # <<<<<<<<<<<<<<
 *   from .slow_stream import OutputStream as create_OutputStream
 *   from .slow_stream import ByteCountingOutputStream
 */
      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_n_s_InputStream);
      __Pyx_GIVEREF(__pyx_n_s_InputStream);
      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_InputStream);
      __pyx_t_9 = __Pyx_Import(__pyx_n_s_slow_stream, __pyx_t_8, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 55, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_InputStream); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_8);
      __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_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/coders/coder_impl.py":56
 * except ImportError:
 *   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_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 56, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_n_s_OutputStream);
      __Pyx_GIVEREF(__pyx_n_s_OutputStream);
      PyList_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_OutputStream);
      __pyx_t_8 = __Pyx_Import(__pyx_n_s_slow_stream, __pyx_t_9, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 56, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_ImportFrom(__pyx_t_8, __pyx_n_s_OutputStream); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 56, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_9);
      __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_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "apache_beam/coders/coder_impl.py":57
 *   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
 * # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
 */
      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 57, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_n_s_ByteCountingOutputStream);
      __Pyx_GIVEREF(__pyx_n_s_ByteCountingOutputStream);
      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_ByteCountingOutputStream);
      __pyx_t_9 = __Pyx_Import(__pyx_n_s_slow_stream, __pyx_t_8, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 57, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_ByteCountingOutputStream); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 57, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream);
      __Pyx_DECREF_SET(__pyx_v_11apache_beam_6coders_10coder_impl_ByteCountingOutputStream, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "apache_beam/coders/coder_impl.py":58
 *   from .slow_stream import OutputStream as create_OutputStream
 *   from .slow_stream import ByteCountingOutputStream
 *   from .slow_stream import get_varint_size             # <<<<<<<<<<<<<<
 * # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
 * 
 */
      __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 58, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_n_s_get_varint_size);
      __Pyx_GIVEREF(__pyx_n_s_get_varint_size);
      PyList_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_get_varint_size);
      __pyx_t_8 = __Pyx_Import(__pyx_n_s_slow_stream, __pyx_t_9, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 58, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_ImportFrom(__pyx_t_8, __pyx_n_s_get_varint_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 58, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_9);
      __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_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__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":46
 * 
 * # pylint: disable=wrong-import-order, wrong-import-position, ungrouped-imports
 * try:             # <<<<<<<<<<<<<<
 *   from .stream import InputStream as create_InputStream
 *   from .stream import OutputStream as create_OutputStream
 */
    __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":61
 * # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
 * 
 * try:                # Python 2             # <<<<<<<<<<<<<<
 *   long              # pylint: disable=long-builtin
 *   unicode           # pylint: disable=unicode-builtin
 */
  {
    __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":62
 * 
 * try:                # Python 2
 *   long              # pylint: disable=long-builtin             # <<<<<<<<<<<<<<
 *   unicode           # pylint: disable=unicode-builtin
 * except NameError:   # Python 3
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_long); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 62, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":63
 * try:                # Python 2
 *   long              # pylint: disable=long-builtin
 *   unicode           # pylint: disable=unicode-builtin             # <<<<<<<<<<<<<<
 * except NameError:   # Python 3
 *   long = int
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "apache_beam/coders/coder_impl.py":61
 * # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
 * 
 * try:                # Python 2             # <<<<<<<<<<<<<<
 *   long              # pylint: disable=long-builtin
 *   unicode           # pylint: disable=unicode-builtin
 */
    }
    __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_L15_try_end;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __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;

    /* "apache_beam/coders/coder_impl.py":64
 *   long              # pylint: disable=long-builtin
 *   unicode           # pylint: disable=unicode-builtin
 * except NameError:   # Python 3             # <<<<<<<<<<<<<<
 *   long = int
 *   unicode = str
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("apache_beam.coders.coder_impl", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 64, __pyx_L12_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);

      /* "apache_beam/coders/coder_impl.py":65
 *   unicode           # pylint: disable=unicode-builtin
 * except NameError:   # Python 3
 *   long = int             # <<<<<<<<<<<<<<
 *   unicode = str
 * 
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_long, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 65, __pyx_L12_except_error)

      /* "apache_beam/coders/coder_impl.py":66
 * except NameError:   # Python 3
 *   long = int
 *   unicode = str             # <<<<<<<<<<<<<<
 * 
 * 
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 66, __pyx_L12_except_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L11_exception_handled;
    }
    goto __pyx_L12_except_error;
    __pyx_L12_except_error:;

    /* "apache_beam/coders/coder_impl.py":61
 * # pylint: enable=wrong-import-order, wrong-import-position, ungrouped-imports
 * 
 * try:                # Python 2             # <<<<<<<<<<<<<<
 *   long              # pylint: disable=long-builtin
 *   unicode           # pylint: disable=unicode-builtin
 */
    __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_L11_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_L15_try_end:;
  }

  /* "apache_beam/coders/coder_impl.py":72
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     raise NotImplementedError
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":76
 *     raise NotImplementedError
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     raise NotImplementedError
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":80
 *     raise NotImplementedError
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     """Encodes an object to an unnested string."""
 *     raise NotImplementedError
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_2) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":84
 *     raise NotImplementedError
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     """Decodes an object to an unnested string."""
 *     raise NotImplementedError
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_2) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":88
 *     raise NotImplementedError
 * 
 *   def encode_nested(self, value):             # <<<<<<<<<<<<<<
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, True)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_9encode_nested, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_encode_nested, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_encode_nested, __pyx_t_2) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":93
 *     return out.get()
 * 
 *   def decode_nested(self, encoded):             # <<<<<<<<<<<<<<
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_11decode_nested, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_decode_nested, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_decode_nested, __pyx_t_2) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":96
 *     return self.decode_from_stream(create_InputStream(encoded), True)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     return self._get_nested_size(len(self.encode(value)), nested)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_13estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CoderImpl_estimate_size, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":100
 *     return self._get_nested_size(len(self.encode(value)), nested)
 * 
 *   def _get_nested_size(self, inner_size, nested):             # <<<<<<<<<<<<<<
 *     if not nested:
 *       return inner_size
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_15_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__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_get_nested_size, __pyx_t_2) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "apache_beam/coders/coder_impl.py":106
 *     return varint_size + inner_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables.
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_17get_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__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_2) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = ()
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_19__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__23)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9CoderImpl_21__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__25)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":130
 *   Subclass of CoderImpl implementing stream methods using encode/decode."""
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     stream.write(self.encode(value), nested)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__27)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl);

  /* "apache_beam/coders/coder_impl.py":134
 *     stream.write(self.encode(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     """Reads object from potentially-nested encoding in stream."""
 *     return self.decode(stream.read_all(nested))
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__29)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SimpleCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = ()
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__31)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__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__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":144
 *   Subclass of CoderImpl implementing encode/decode using stream methods."""
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     out = create_OutputStream()
 *     self.encode_to_stream(value, out, False)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__35)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_2) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl);

  /* "apache_beam/coders/coder_impl.py":149
 *     return out.get()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_2) < 0) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl);

  /* "apache_beam/coders/coder_impl.py":152
 *     return self.decode_from_stream(create_InputStream(encoded), False)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     out = ByteCountingOutputStream()
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = ()
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__41)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__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__43)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":173
 *     self._size_estimator = size_estimator or self._default_size_estimator
 * 
 *   def _default_size_estimator(self, value):             # <<<<<<<<<<<<<<
 *     return len(self.encode(value))
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_default_size_estimator, __pyx_t_2) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":176
 *     return len(self.encode(value))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     return stream.write(self._encoder(value), nested)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__47)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":179
 *     return stream.write(self._encoder(value), nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     return self._decoder(stream.read_all(nested))
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__49)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":182
 *     return self._decoder(stream.read_all(nested))
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return self._encoder(value)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__51)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_2) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":185
 *     return self._encoder(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._decoder(encoded)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__53)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_2) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":188
 *     return self._decoder(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__55)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "apache_beam/coders/coder_impl.py":191
 *     return self._get_nested_size(self._size_estimator(value), nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # TODO(robertwb): Remove this once all coders are correct.
 *     if isinstance(value, observable.ObservableMixin):
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__57)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_2) < 0) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_CallbackCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._decoder, self._encoder, self._size_estimator)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_17__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__59)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17CallbackCoderImpl_19__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__61)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":221
 *               value, type(value), self._step_label))
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     self._check_safe(value)
 *     return self._underlying_coder.encode_to_stream(value, stream, nested)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_3encode_to_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DeterministicFastPrimitivesCoder, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":225
 *     return self._underlying_coder.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.decode_from_stream(stream, nested)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_5decode_from_stream, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DeterministicFastPrimitivesCoder_2, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":228
 *     return self._underlying_coder.decode_from_stream(stream, nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     self._check_safe(value)
 *     return self._underlying_coder.encode(value)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_7encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DeterministicFastPrimitivesCoder_3, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_2) < 0) __PYX_ERR(0, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":232
 *     return self._underlying_coder.encode(value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.decode(encoded)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_9decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DeterministicFastPrimitivesCoder_4, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_2) < 0) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":235
 *     return self._underlying_coder.decode(encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.estimate_size(value, nested)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_11estimate_size, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DeterministicFastPrimitivesCoder_5, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":238
 *     return self._underlying_coder.estimate_size(value, nested)
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return self._underlying_coder.get_estimated_size_and_observables(
 *         value, nested)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_13get_estimated_size_and_observables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DeterministicFastPrimitivesCoder_6, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_2) < 0) __PYX_ERR(0, 238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_DeterministicFastPrimitivesCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._step_label, self._underlying_coder)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DeterministicFastPrimitivesCoder_7, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__75)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_DeterministicFastPrimitivesCoderImpl, (type(self), 0x0f41539, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_36DeterministicFastPrimitivesCoderImpl_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DeterministicFastPrimitivesCoder_8, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":243
 * 
 * 
 * class ProtoCoderImpl(SimpleCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __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_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __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_7)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "apache_beam/coders/coder_impl.py":246
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def __init__(self, proto_message_type):             # <<<<<<<<<<<<<<
 *     self.proto_message_type = proto_message_type
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__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__79)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/coders/coder_impl.py":249
 *     self.proto_message_type = proto_message_type
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     return value.SerializeToString()
 * 
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__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__81)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_encode, __pyx_t_8) < 0) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/coders/coder_impl.py":252
 *     return value.SerializeToString()
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     proto_message = self.proto_message_type()
 *     proto_message.ParseFromString(encoded)
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__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__83)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_decode, __pyx_t_8) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/coders/coder_impl.py":243
 * 
 * 
 * class ProtoCoderImpl(SimpleCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ProtoCoderImpl, __pyx_t_2, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProtoCoderImpl, __pyx_t_8) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":258
 * 
 * 
 * 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":259
 * 
 * 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":260
 * 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":261
 * 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":262
 * 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":263
 * 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":264
 * 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":265
 * 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":266
 * 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":267
 * LIST_TYPE = 5
 * TUPLE_TYPE = 6
 * DICT_TYPE = 7             # <<<<<<<<<<<<<<
 * SET_TYPE = 8
 * 
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_DICT_TYPE = 7;

  /* "apache_beam/coders/coder_impl.py":268
 * TUPLE_TYPE = 6
 * DICT_TYPE = 7
 * SET_TYPE = 8             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_11apache_beam_6coders_10coder_impl_SET_TYPE = 8;

  /* "apache_beam/coders/coder_impl.py":277
 *     self.fallback_coder_impl = fallback_coder_impl
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     if isinstance(value, observable.ObservableMixin):
 *       # FastPrimitivesCoderImpl can presumably encode the elements too.
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_3get_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__85)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_2) < 0) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":286
 *     return out.get_count(), []
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     t = type(value)
 *     if value is None:
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_5encode_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__87)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __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_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 286, __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":329
 *       self.fallback_coder_impl.encode_to_stream(value, stream, nested)
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     t = stream.read_byte()
 *     if t == NONE_TYPE:
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_7decode_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__89)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __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_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FastPrimitivesCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.fallback_coder_impl,)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastPrimitivesCoderImpl___reduce, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__91)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_FastPrimitivesCoderImpl, (type(self), 0x777bafb, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_FastPrimitivesCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23FastPrimitivesCoderImpl_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastPrimitivesCoderImpl___setsta, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":367
 *   A coder for bytes/str objects."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write(value, nested)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__95)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":370
 *     out.write(value, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return in_stream.read_all(nested)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__97)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 370, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":373
 *     return in_stream.read_all(nested)
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     assert isinstance(value, bytes), (value, type(value))
 *     return value
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__99)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_2) < 0) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "apache_beam/coders/coder_impl.py":377
 *     return value
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return encoded
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__101)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_2) < 0) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_BytesCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = ()
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__103)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__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__105)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":384
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_bigendian_double(value)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__107)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl);

  /* "apache_beam/coders/coder_impl.py":387
 *     out.write_bigendian_double(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return in_stream.read_bigendian_double()
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl);

  /* "apache_beam/coders/coder_impl.py":390
 *     return in_stream.read_bigendian_double()
 * 
 *   def estimate_size(self, unused_value, nested=False):             # <<<<<<<<<<<<<<
 *     # A double is encoded as 8 bytes, regardless of nesting.
 *     return 8
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__111)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_FloatCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = ()
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__113)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__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__115)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":395
 * 
 * 
 * class IntervalWindowCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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_2, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_IntervalWindowCoderImpl, __pyx_n_s_IntervalWindowCoderImpl, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "apache_beam/coders/coder_impl.py":399
 * 
 *   # 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 - (1 << 63)
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_1_to_normal_time, 0, __pyx_n_s_IntervalWindowCoderImpl__to_norm, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_to_normal_time, __pyx_t_8) < 0) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/coders/coder_impl.py":403
 *     return value - (1 << 63)
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_3_from_normal_time, 0, __pyx_n_s_IntervalWindowCoderImpl__from_no, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_from_normal_time, __pyx_t_8) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/coders/coder_impl.py":407
 *     return value + (1 << 63)
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     span_micros = value.end.micros - value.start.micros
 *     out.write_bigendian_uint64(
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_5encode_to_stream, 0, __pyx_n_s_IntervalWindowCoderImpl_encode_t, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_encode_to_stream, __pyx_t_8) < 0) __PYX_ERR(0, 407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/coders/coder_impl.py":413
 *     out.write_var_int64(span_micros // 1000)
 * 
 *   def decode_from_stream(self, in_, nested):             # <<<<<<<<<<<<<<
 *     end_millis = self._to_normal_time(in_.read_bigendian_uint64())
 *     start_millis = end_millis - in_.read_var_int64()
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_7decode_from_stream, 0, __pyx_n_s_IntervalWindowCoderImpl_decode_f, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_decode_from_stream, __pyx_t_8) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/coders/coder_impl.py":421
 *     return ret
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # An IntervalWindow is context-insensitive, with a timestamp (8 bytes)
 *     # and a varint timespam.
 */
  __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23IntervalWindowCoderImpl_9estimate_size, 0, __pyx_n_s_IntervalWindowCoderImpl_estimate, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__126);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_estimate_size, __pyx_t_8) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "apache_beam/coders/coder_impl.py":395
 * 
 * 
 * class IntervalWindowCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_IntervalWindowCoderImpl, __pyx_t_2, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IntervalWindowCoderImpl, __pyx_t_8) < 0) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":431
 *   """For internal use only; no backwards-compatibility guarantees."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_bigendian_int64(value.micros)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__128)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl);

  /* "apache_beam/coders/coder_impl.py":434
 *     out.write_bigendian_int64(value.micros)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return Timestamp(micros=in_stream.read_bigendian_int64())
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__130)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 434, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl);

  /* "apache_beam/coders/coder_impl.py":437
 *     return Timestamp(micros=in_stream.read_bigendian_int64())
 * 
 *   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_2 = __Pyx_CyFunction_NewEx(&__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__132)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TimestampCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self.timestamp_class,)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__134)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__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__136)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":443
 * 
 * 
 * small_ints = [chr(_).encode('latin-1') for _ in range(128)]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  for (__pyx_t_10 = 0; __pyx_t_10 < 0x80; __pyx_t_10+=1) {
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s__137, __pyx_t_1) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_chr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s__137); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_9) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __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_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":451
 *   A coder for long/int objects."""
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     out.write_var_int64(value)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__140)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "apache_beam/coders/coder_impl.py":454
 *     out.write_var_int64(value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return in_stream.read_var_int64()
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__142)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "apache_beam/coders/coder_impl.py":457
 *     return in_stream.read_var_int64()
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     ivalue = value  # type cast
 *     if 0 <= ivalue < len(small_ints):
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__144)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_2) < 0) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "apache_beam/coders/coder_impl.py":463
 *     return StreamCoderImpl.encode(self, value)
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     if len(encoded) == 1:
 *       i = ord(encoded)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__146)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_2) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "apache_beam/coders/coder_impl.py":470
 *     return StreamCoderImpl.decode(self, encoded)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     # Note that VarInts are encoded the same way regardless of nesting.
 *     return get_varint_size(value)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__148)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_VarIntCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = ()
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__150)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__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__152)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":483
 *     self._value = value
 * 
 *   def encode_to_stream(self, value, stream, nested):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__154)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 483, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "apache_beam/coders/coder_impl.py":486
 *     pass
 * 
 *   def decode_from_stream(self, stream, nested):             # <<<<<<<<<<<<<<
 *     return self._value
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__156)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "apache_beam/coders/coder_impl.py":489
 *     return self._value
 * 
 *   def encode(self, value):             # <<<<<<<<<<<<<<
 *     b = b''  # avoid byte vs str vs unicode error
 *     return b
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__158)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_encode, __pyx_t_2) < 0) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "apache_beam/coders/coder_impl.py":493
 *     return b
 * 
 *   def decode(self, encoded):             # <<<<<<<<<<<<<<
 *     return self._value
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__160)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_decode, __pyx_t_2) < 0) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "apache_beam/coders/coder_impl.py":496
 *     return self._value
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__162)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SingletonCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._value,)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__164)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__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__166)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":510
 *     self._coder_impls = tuple(coder_impls)
 * 
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__168)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_extract_components, __pyx_t_2) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":513
 *     raise NotImplementedError
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__170)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_construct_from_components, __pyx_t_2) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":516
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     values = self._extract_components(value)
 *     if len(self._coder_impls) != len(values):
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__172)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":526
 *                          nested or i + 1 < len(self._coder_impls))
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     return self._construct_from_components(
 *         [c.decode_from_stream(in_stream,
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__174)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":532
 *          for i, c in enumerate(self._coder_impls)])
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores sizes of observable components.
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__176)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "apache_beam/coders/coder_impl.py":539
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     values = self._extract_components(value)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__178)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_2) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_AbstractComponentCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._coder_impls,)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__180)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__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__182)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":557
 *   """A coder for tuple objects."""
 * 
 *   def _extract_components(self, value):             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__184)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_dict, __pyx_n_s_extract_components, __pyx_t_2) < 0) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl);

  /* "apache_beam/coders/coder_impl.py":560
 *     return value
 * 
 *   def _construct_from_components(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__186)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl->tp_dict, __pyx_n_s_construct_from_components, __pyx_t_2) < 0) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._coder_impls,)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__188)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     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_2 = __Pyx_CyFunction_NewEx(&__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__190)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":589
 * 
 *   # Default buffer size of 64kB of handling iterables of unknown length.
 *   _DEFAULT_BUFFER_SIZE = 64 * 1024             # <<<<<<<<<<<<<<
 * 
 *   def __init__(self, elem_coder):
 */
  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, 589, __pyx_L1_error)
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":594
 *     self._elem_coder = elem_coder
 * 
 *   def _construct_from_sequence(self, values):             # <<<<<<<<<<<<<<
 *     raise NotImplementedError
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__192)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_construct_from_sequence, __pyx_t_2) < 0) __PYX_ERR(0, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":597
 *     raise NotImplementedError
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     # Compatible with Java's IterableLikeCoder.
 *     if hasattr(value, '__len__'):
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__194)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_2) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":624
 *       out.write_var_int64(0)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     size = in_stream.read_bigendian_int32()
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__196)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_2) < 0) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":640
 *     return self._construct_from_sequence(elements)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     # TODO(ccy): This ignores element sizes.
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__198)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_2) < 0) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "apache_beam/coders/coder_impl.py":647
 *     return estimated_size
 * 
 *   def get_estimated_size_and_observables(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Returns estimated size of value along with any nested observables."""
 *     estimated_size = 0
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__200)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_2) < 0) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_SequenceCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._elem_coder,)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__202)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_SequenceCoderImpl, (type(self), 0x6f54d5a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_SequenceCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__204)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":675
 *   A coder for homogeneous tuple objects."""
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return tuple(components)
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__206)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl->tp_dict, __pyx_n_s_construct_from_sequence, __pyx_t_2) < 0) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_TupleSequenceCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._elem_coder,)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__208)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_TupleSequenceCoderImpl, (type(self), 0x6f54d5a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_TupleSequenceCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__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__210)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":684
 *   A coder for homogeneous iterable objects."""
 * 
 *   def _construct_from_sequence(self, components):             # <<<<<<<<<<<<<<
 *     return components
 * 
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_1_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__212)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __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, 684, __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 bint use_setstate
 *     state = (self._elem_coder,)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_3__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__214)); 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_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":14
 *     else:
 *         return __pyx_unpickle_IterableCoderImpl, (type(self), 0x6f54d5a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_IterableCoderImpl__set_state(self, __pyx_state)
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17IterableCoderImpl_5__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__216)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "apache_beam/coders/coder_impl.py":688
 * 
 * 
 * class PaneInfoEncoding(object):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __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_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __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_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "apache_beam/coders/coder_impl.py":698
 *   """
 * 
 *   FIRST = 0             # <<<<<<<<<<<<<<
 *   ONE_INDEX = 1
 *   TWO_INDICES = 2
 */
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_FIRST, __pyx_int_0) < 0) __PYX_ERR(0, 698, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":699
 * 
 *   FIRST = 0
 *   ONE_INDEX = 1             # <<<<<<<<<<<<<<
 *   TWO_INDICES = 2
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ONE_INDEX, __pyx_int_1) < 0) __PYX_ERR(0, 699, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":700
 *   FIRST = 0
 *   ONE_INDEX = 1
 *   TWO_INDICES = 2             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_TWO_INDICES, __pyx_int_2) < 0) __PYX_ERR(0, 700, __pyx_L1_error)

  /* "apache_beam/coders/coder_impl.py":688
 * 
 * 
 * class PaneInfoEncoding(object):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PaneInfoEncoding, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PaneInfoEncoding, __pyx_t_11) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":718
 *       return PaneInfoEncoding.TWO_INDICES
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     encoding_type = self._choose_encoding(value)
 *     out.write_byte(value.encoded_byte | (encoding_type << 4))
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__218)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_1) < 0) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl);

  /* "apache_beam/coders/coder_impl.py":731
 *       raise NotImplementedError('Invalid PaneInfoEncoding: %s' % encoding_type)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     encoded_first_byte = in_stream.read_byte()
 *     base = windowed_value._BYTE_TO_PANE_INFO[encoded_first_byte & 0xF]
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__220)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_1) < 0) __PYX_ERR(0, 731, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl);

  /* "apache_beam/coders/coder_impl.py":752
 *         base.is_first, base.is_last, base.timing, index, nonspeculative_index)
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     """Estimates the encoded size of the given value, in bytes."""
 *     size = 1
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__222)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl->tp_dict, __pyx_n_s_estimate_size, __pyx_t_1) < 0) __PYX_ERR(0, 752, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_PaneInfoCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = ()
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__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__224)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     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_1 = __Pyx_CyFunction_NewEx(&__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__226)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":773
 *   # TODO(BEAM-1524): 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 - (1 << 63)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_1_to_normal_time, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_WindowedValueCoderImpl__to_norma, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_to_normal_time, __pyx_t_1) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":777
 *     return value - (1 << 63)
 * 
 *   def _from_normal_time(self, value):             # <<<<<<<<<<<<<<
 *     """Convert signed to "lexicographically ordered unsigned"."""
 *     return value + (1 << 63)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_3_from_normal_time, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_WindowedValueCoderImpl__from_nor, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_from_normal_time, __pyx_t_1) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":788
 *     self._pane_info_coder = PaneInfoCoderImpl()
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     wv = value  # type cast
 *     # Avoid creation of Timestamp object.
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_7encode_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__232)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_encode_to_stream, __pyx_t_1) < 0) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":805
 *     self._value_coder.encode_to_stream(wv.value, out, nested)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     timestamp = self._to_normal_time(in_stream.read_bigendian_uint64())
 *     # Restore MIN/MAX timestamps to their actual values as encoding incurs loss
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_9decode_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__234)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_decode_from_stream, __pyx_t_1) < 0) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "apache_beam/coders/coder_impl.py":835
 *         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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_11get_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__236)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl->tp_dict, __pyx_n_s_get_estimated_size_and_observabl, __pyx_t_1) < 0) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_11apache_beam_6coders_10coder_impl_WindowedValueCoderImpl);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef bint use_setstate
 *     state = (self._pane_info_coder, self._timestamp_coder, self._value_coder, self._windows_coder)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_WindowedValueCoderImpl___reduce, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":14
 *     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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_22WindowedValueCoderImpl_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_WindowedValueCoderImpl___setstat, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "apache_beam/coders/coder_impl.py":857
 * 
 * 
 * class LengthPrefixCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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_1, 0, ((PyObject *)__pyx_ptype_11apache_beam_6coders_10coder_impl_StreamCoderImpl));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_LengthPrefixCoderImpl, __pyx_n_s_LengthPrefixCoderImpl, (PyObject *) NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_kp_s_For_internal_use_only_no_backwar_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "apache_beam/coders/coder_impl.py":862
 *   Coder which prefixes the length of the encoded object in the stream."""
 * 
 *   def __init__(self, value_coder):             # <<<<<<<<<<<<<<
 *     self._value_coder = value_coder
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_1__init__, 0, __pyx_n_s_LengthPrefixCoderImpl___init, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":865
 *     self._value_coder = value_coder
 * 
 *   def encode_to_stream(self, value, out, nested):             # <<<<<<<<<<<<<<
 *     encoded_value = self._value_coder.encode(value)
 *     out.write_var_int64(len(encoded_value))
 */
  __pyx_t_11 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_3encode_to_stream, 0, __pyx_n_s_LengthPrefixCoderImpl_encode_to, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__244)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_encode_to_stream, __pyx_t_11) < 0) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":870
 *     out.write(encoded_value)
 * 
 *   def decode_from_stream(self, in_stream, nested):             # <<<<<<<<<<<<<<
 *     value_length = in_stream.read_var_int64()
 *     return self._value_coder.decode(in_stream.read(value_length))
 */
  __pyx_t_11 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_5decode_from_stream, 0, __pyx_n_s_LengthPrefixCoderImpl_decode_fro, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_decode_from_stream, __pyx_t_11) < 0) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":874
 *     return self._value_coder.decode(in_stream.read(value_length))
 * 
 *   def estimate_size(self, value, nested=False):             # <<<<<<<<<<<<<<
 *     value_size = self._value_coder.estimate_size(value)
 *     return get_varint_size(value_size) + value_size
 */
  __pyx_t_11 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21LengthPrefixCoderImpl_7estimate_size, 0, __pyx_n_s_LengthPrefixCoderImpl_estimate_s, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__248)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_tuple__249);
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_estimate_size, __pyx_t_11) < 0) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "apache_beam/coders/coder_impl.py":857
 * 
 * 
 * class LengthPrefixCoderImpl(StreamCoderImpl):             # <<<<<<<<<<<<<<
 *   """For internal use only; no backwards-compatibility guarantees.
 * 
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LengthPrefixCoderImpl, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LengthPrefixCoderImpl, __pyx_t_11) < 0) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_CoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_1__pyx_unpickle_CoderImpl, 0, __pyx_n_s_pyx_unpickle_CoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":9
 *         __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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_3__pyx_unpickle_SimpleCoderImpl, 0, __pyx_n_s_pyx_unpickle_SimpleCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SimpleCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_StreamCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_5__pyx_unpickle_StreamCoderImpl, 0, __pyx_n_s_pyx_unpickle_StreamCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_StreamCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":9
 *         __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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_7__pyx_unpickle_CallbackCoderImpl, 0, __pyx_n_s_pyx_unpickle_CallbackCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CallbackCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_DeterministicFastPrimitivesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x0f41539:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_9__pyx_unpickle_DeterministicFastPrimitivesCoderImpl, 0, __pyx_n_s_pyx_unpickle_DeterministicFast, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_DeterministicFast, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":9
 *         __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(<DeterministicFastPrimitivesCoderImpl> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_DeterministicFastPrimitivesCoderImpl__set_state(DeterministicFastPrimitivesCoderImpl __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._step_label = __pyx_state[0]; __pyx_result._underlying_coder = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_11__pyx_unpickle_FastPrimitivesCoderImpl, 0, __pyx_n_s_pyx_unpickle_FastPrimitivesCod, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FastPrimitivesCod, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_BytesCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_13__pyx_unpickle_BytesCoderImpl, 0, __pyx_n_s_pyx_unpickle_BytesCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BytesCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":9
 *         __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])
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_15__pyx_unpickle_FloatCoderImpl, 0, __pyx_n_s_pyx_unpickle_FloatCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FloatCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TimestampCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x11860ce:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_17__pyx_unpickle_TimestampCoderImpl, 0, __pyx_n_s_pyx_unpickle_TimestampCoderImp, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TimestampCoderImp, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":9
 *         __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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_19__pyx_unpickle_VarIntCoderImpl, 0, __pyx_n_s_pyx_unpickle_VarIntCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_VarIntCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_SingletonCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xe106c97:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_21__pyx_unpickle_SingletonCoderImpl, 0, __pyx_n_s_pyx_unpickle_SingletonCoderImp, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SingletonCoderImp, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":9
 *         __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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_23__pyx_unpickle_AbstractComponentCoderImpl, 0, __pyx_n_s_pyx_unpickle_AbstractComponent, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_AbstractComponent, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TupleCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x56b63b6:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_25__pyx_unpickle_TupleCoderImpl, 0, __pyx_n_s_pyx_unpickle_TupleCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TupleCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":9
 *         __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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_27__pyx_unpickle_SequenceCoderImpl, 0, __pyx_n_s_pyx_unpickle_SequenceCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_SequenceCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_TupleSequenceCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0x6f54d5a:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_29__pyx_unpickle_TupleSequenceCoderImpl, 0, __pyx_n_s_pyx_unpickle_TupleSequenceCode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_TupleSequenceCode, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":9
 *         __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]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_31__pyx_unpickle_IterableCoderImpl, 0, __pyx_n_s_pyx_unpickle_IterableCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_IterableCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_PaneInfoCoderImpl(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     if __pyx_checksum != 0xd41d8cd:
 *         from pickle import PickleError as __pyx_PickleError
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_33__pyx_unpickle_PaneInfoCoderImpl, 0, __pyx_n_s_pyx_unpickle_PaneInfoCoderImpl, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PaneInfoCoderImpl, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":9
 *         __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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11apache_beam_6coders_10coder_impl_35__pyx_unpickle_WindowedValueCoderImpl, 0, __pyx_n_s_pyx_unpickle_WindowedValueCode, NULL, __pyx_n_s_apache_beam_coders_coder_impl, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_WindowedValueCode, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init apache_beam.coders.coder_impl", 0, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } 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((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
#include "frameobject.h"
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = f->f_localsplus;
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* 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_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

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

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* 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();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#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 */
  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    if (likely(result)) {
        Py_INCREF(result);
    } else if (unlikely(PyErr_Occurred())) {
        result = NULL;
    } else {
#else
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

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

/* PyIntBinop */
      #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int 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))) {
        const long b = intval;
        long a;
        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;
                    }
                    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;
                    }
                    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;
                    }
                    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;
                    }
                    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;
                    }
                    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;
                    }
                    CYTHON_FALLTHROUGH;
                #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
                default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
                #else
                default: Py_RETURN_FALSE;
                #endif
            }
        }
            if (a == b) {
                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);
}
#endif

/* GetItemInt */
      static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* UnpackUnboundCMethod */
      static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
    }
#endif
    return 0;
}

/* 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_iteritems */
      static CYTHON_INLINE PyObject* __Pyx_PyDict_IterItems(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
    else
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_iteritems, d);
}

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

/* RaiseTooManyValuesToUnpack */
      static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
      static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
      static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
      static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* 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;
    length = stop - start;
    if (unlikely(length <= 0))
        return PyUnicode_FromUnicode(NULL, 0);
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* PyIntBinop */
      #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a))
                return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2);
            else {
                long q, r;
                q = a / b;
                r = a - q*b;
                q -= ((r != 0) & ((r ^ b) < 0));
                x = q;
            }
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2);
            }
        }
                {
                    long q, r;
                    q = a / b;
                    r = a - q*b;
                    q -= ((r != 0) & ((r ^ b) < 0));
                    x = q;
                }
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                {
                    PY_LONG_LONG q, r;
                    q = lla / llb;
                    r = lla - q*llb;
                    q -= ((r != 0) & ((r ^ llb) < 0));
                    llx = q;
                }
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
}
#endif

/* Import */
      static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
      static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* PyIntBinop */
      #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #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

/* 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", c->ob_type->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;
}

/* ObjectGetItem */
      #if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* PyIntBinop */
      #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

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

/* PyIntBinop */
      #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_LshiftObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
            if (likely(b < (long) (sizeof(long)*8) && a == (a << b) >> b) || !a) {
                return PyInt_FromLong(a << b);
            }
    }
    #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_lshift(op1, op2);
            }
        }
                x = a << b;
#ifdef HAVE_LONG_LONG
                if (unlikely(!(b < (long) (sizeof(long)*8) && a == x >> b)) && a) {
                    lla = a;
                    goto long_long;
                }
#else
                if (likely(b < (long) (sizeof(long)*8) && a == x >> b) || !a)
#endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla << llb;
                if (likely(lla == llx >> llb))
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceLshift : PyNumber_Lshift)(op1, op2);
}
#endif

/* PyIntBinop */
      #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
            return PyInt_FromLong(a & b);
    }
    #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_and(op1, op2);
            }
        }
                x = a & b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla & llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2);
}
#endif

/* PyIntBinop */
      #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RshiftObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
            return PyInt_FromLong(a >> b);
    }
    #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_rshift(op1, op2);
            }
        }
                x = a >> b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla >> llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceRshift : PyNumber_Rshift)(op1, op2);
}
#endif

/* py_abs */
      #if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
    if (likely(Py_SIZE(n) == -1)) {
        return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    {
        PyObject *copy = _PyLong_Copy((PyLongObject*)n);
        if (likely(copy)) {
            Py_SIZE(copy) = -(Py_SIZE(copy));
        }
        return copy;
    }
#else
    return PyNumber_Negative(n);
#endif
}
#endif

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

/* SetupReduce */
      static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
            ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
            ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto GOOD;
BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

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

/* SaveResetException */
      #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if PY_VERSION_HEX >= 0x030700A2
    *type = tstate->exc_state.exc_type;
    *value = tstate->exc_state.exc_value;
    *tb = tstate->exc_state.exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if PY_VERSION_HEX >= 0x030700A2
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = type;
    tstate->exc_state.exc_value = value;
    tstate->exc_state.exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
      #if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
#endif
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if PY_VERSION_HEX >= 0x030700A2
    tmp_type = tstate->exc_state.exc_type;
    tmp_value = tstate->exc_state.exc_value;
    tmp_tb = tstate->exc_state.exc_traceback;
    tstate->exc_state.exc_type = local_type;
    tstate->exc_state.exc_value = local_value;
    tstate->exc_state.exc_traceback = local_tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* FetchCommonType */
        static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CythonFunction */
        #include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CalculateMetaclass */
            static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
            static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* CLineInTraceback */
            #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    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)) {
      use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (PyObject_Not(use_cline) != 0) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
            static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
            #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
            #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
            static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
            static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
            static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
    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);
    }
}

/* CIntToPy */
            static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
    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);
    }
}

/* CIntToPy */
            static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
    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 int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
            static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
            static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
    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
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int64_t) -1;
        }
    } else {
        int64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int64_t) -1;
        val = __Pyx_PyInt_As_int64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int64_t");
    return (int64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int64_t");
    return (int64_t) -1;
}

/* CIntFromPy */
            static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) {
    const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0;
    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
            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;
}

/* CIntFromPy */
            static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint64_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 (uint64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_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 (uint64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_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
            uint64_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 (uint64_t) -1;
        }
    } else {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyInt_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

/* FastTypeChecks */
            #if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
            static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* VoidPtrExport */
            static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) {
    PyObject *d;
    PyObject *cobj = 0;
    d = PyDict_GetItem(__pyx_d, __pyx_n_s_pyx_capi);
    Py_XINCREF(d);
    if (!d) {
        d = PyDict_New();
        if (!d)
            goto bad;
        if (__Pyx_PyObject_SetAttrStr(__pyx_m, __pyx_n_s_pyx_capi, d) < 0)
            goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItem(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* ModuleImport */
            #ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

/* TypeImport */
            #ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (!strict && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

/* VoidPtrImport */
            #ifndef __PYX_HAVE_RT_ImportVoidPtr
#define __PYX_HAVE_RT_ImportVoidPtr
static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, name);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C variable %.200s",
                PyModule_GetName(module), name);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, desc);
        goto bad;
    }
    *p = PyCObject_AsVoidPtr(cobj);}
#endif
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* FunctionImport */
            #ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(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 PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_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 */
